HUD-2000简单排序解法(c++)
//把字符串类型先强制转化为整型进行排序。
#include <iostream>
using namespace std;
int main()
{
char x, y, z;
while (cin >> x >> y >> z)
{
if (int(x) > int(y))
{
char temp = x;
x = y;
y = temp;
}
if (int(x) > int(z))
{
char temp = x;
x = z;
z = temp;
}
if (int(y) > int(z))
{
char temp = y;
y = z;
z = temp;
}
cout << x << " " << y << " " << z << endl;
}
}