Problem Description
this day the teacher as a routine to small Hao out a topic: The teacher to small Hao a string, let small Hao will the string in reverse order output.
Input
The first line includes a T, which indicates how many sets of test data are:
Next T line, each line includes a string (length not exceeding 65535).
Output
For each test data output it's reverse string.
Sample Input
1oaHoaiX EvoL I
Sample Output
I Love Xiaohao
1#include <stdio.h>2#include <string.h>3 intMain ()4 {5 intL,i,n;6 Chara[65536];7 while(SCANF ("%d", &n)! =EOF)8 {GetChar ();9 while(n--)Ten { One gets (a); A { -L=strlen (a); - for(i=0; i<=l-1; l--) theprintf"%c", a[l-1]); -printf"\ n"); - - } + - + } A at } - - - return 0; -}
Wuhan University of Science and Technology acm:1009: Chinese Edition C language Programming tutorial (second edition) Exercise 5.12