// hdoj_2000 ASCII码排序
// 0MS 228K 434 B GCC
#include <stdio.h>
int main(void)
{
char a[3], temp;
while(scanf("%c%c%c", &a[0], &a[1], &a[2]) != EOF)
{
if(a[0] > a[1])
{
temp = a[0];
a[0] = a[1];
a[1] = temp;
}
if(a[0] > a[2])
{
temp = a[0];
a[0] = a[2];
a[2] = temp;
}
if(a[1] > a[2])
{
temp = a[1];
a[1] = a[2];
a[2] = temp;
}
printf("%c %c %c\n", a[0], a[1], a[2]);
getchar(); //接收回车……
}
return 0;
}
没有getchar()会出错……