hdoj 2000

#include<iostream>
using namespace std;
int main()
{
    char x, y, z, t;
    while (cin >> x >> y >> z)
    {
        if (x > y) { t = x; x = y; y = t; }
        if (x > z) { t = x; x = z; z = t; }
        if (y > z) { t = y; y = z; z = t; }
        cout << x << " " << y << " " << z << endl;
    }
    return 0;
}

你可能感兴趣的:(hdoj 2000)