Topic 1058: Reverse-order output
time limit:1 seconds
Memory limit:32 MB
Special question: No
submitted:7583
Resolution:2673
-
Title Description:
-
Enter any 4 characters (for example, ABCD) and press the output in reverse order (e.g., DCBA)
-
Input:
-
The topic may contain multiple sets of use cases, one row for each group of use cases, and 4 arbitrary characters.
-
Output:
-
For each set of inputs, output a line of inverted strings.
A concrete example of the visible sample.
-
Sample input:
-
Upincvyjwjpwcxoa
-
Sample output:
-
Nipujyvcwpjwaoxc
#include <stdlib.h> #include <stdio.h>int main () { char a[5]; int i; while (scanf ("%s", a)!=eof) {for (I=strlen (a) -1;i>=0;i--) { printf ("%c", A[i]); } printf ("\ n"); } return 0;} /************************************************************** problem:1058 user:kirchhoff Language:c result:accepted time:70 ms memory:912 kb********************************************** ******************/
Nine-degree OJ 1058 reverse-order output