= ASCII码排序 = http://acm.hdu.edu.cn/showproblem.php?pid=2000 {{{#!cplusplus /*written by czk*/ #include void swap(char *s, int i, int j) { char c = s[i]; s[i] = s[j]; s[j] = c; } int main() { char a[3]; while(scanf("%1s%1s%1s", &a[0], &a[1], &a[2]) != EOF) { if(a[0] > a[1]) swap(a, 0, 1); if(a[0] > a[2]) swap(a, 0, 2); if(a[1] > a[2]) swap(a, 1, 2); printf("%c %c %c\n", a[0], a[1], a[2]); } } }}}