C语言代码:
[code]
#include<stdio.h>
int main()
{
char a,b,c,d,t;
while(scanf("%c%c%c",&a,&b,&c) != EOF)
{
if(a > b)
{
t = a;
a = b;
b = t;
}
if(b > c)
{
t = b;
b = c;
c = t;
}
if(a > b)
{
t = a;
a = b;
b = t;
}
scanf("%c",&d);
printf("%c %c %cn",a,b,c);
}
return 0;
}
[/code]