题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=2000
可恶的水题君,又来增强我的自信心~~~~(>_<)~~~~ 珍爱大脑,远离水题~~
准备从 HDU 的 2000 开始做,尽量少看解题报告。
#include <iostream>
#include <algorithm>
using namespace std;
int main(void)
{
char n[4];
while (cin >> n)
{
if (n[0] > n[1]) swap(n[0], n[1]);
if (n[1] > n[2]) swap(n[1], n[2]);
if (n[0] > n[1]) swap(n[0], n[1]);
cout << n[0] << ' ' << n[1] << ' ' << n[2] << endl;
}
return 0;
}