#include<stdio.h>
int main( )
{
char ch[10];
while(scanf("%s",ch)!=EOF)
{
int a,b,c,temp;
a=ch[0]-48;
b=ch[1]-48;
c=ch[2]-48;
if(a<b)
{temp=a;a=b;b=temp;}
if(a<c)
{temp=a;a=c;c=temp;}
if(b<c)
{temp=b;b=c;c=temp;}
printf("%c %c %c\n",c+48,b+48,a+48);
}
return 0;
}
转载于:https://www.cnblogs.com/tangcong/archive/2011/04/28/2031498.html