Describe
After entering three characters (which can be repeated), the ASCII code of each character is printed in the order of three characters from small to large.
-
- Input
-
-
The first line enters a number n, which indicates that there are n sets of test data. The next n rows enter multiple sets of data, each with a row of three characters and no spaces between them.
-
- Output
-
-
For each set of input data, the output line is separated by a space between the characters.
-
- Sample input
-
-
3
-
-
Qwe
-
-
Asd
-
-
Zxc
-
- Sample output
-
-
E Q W
-
-
A D S
-
-
c x Z
-
-
1#include <stdio.h>2 3 intMain () {4 CharA;5 Charb;6 CharC;7 Chartemp;8 intT;9 Tenscanf"%d",&T); One GetChar (); A - while(t--){ -scanf"%c%c%c",&a,&b,&c); the GetChar (); - - if(a>b) { -temp=A; +A=b; -b=temp; + } A at if(a>c) { -temp=A; -A=C; -C=temp; - } - in if(b>c) { -temp=b; tob=C; +C=temp; - } the *printf"%c%c%c\n", a,b,c); $ }Panax Notoginseng return 0; -}
ASCII-code Ordering