ASCII-code Ordering
Time limit:2000/1000 MS (java/others) Memory limit:65536/32768 K (java/others)
Total submission (s): 206054 Accepted Submission (s): 82273
Problem description Input Three characters, the ASCII code of each character is printed in order from small to large to output these three characters.
Input data has more than one group, each of which consists of three characters and no spaces between them.
Output for each set of input data, one line is printed, and the characters are separated by a space.
Sample INPUTQWEASDZXC
Sample outpute q wa d SC x z
1#include <iostream>2#include <cstring>3#include <algorithm>4 using namespacestd;5 intMain ()6 {7 stringS"");8 Chara[Ten];9 while(Getline (cin,s))Ten { One strcpy (A,s.c_str ()); ASort (a,a+3); - for(inti =0; I <3;++i) - { the if(I <2) - { -cout << A[i] <<" ";//don't know why not cout << A[i] + ""; - } + Else - { +cout << A[i] <<Endl; A } at - } - } - return 0; -}
hdu2000 ASCII code Sort "C + +"