#include<stdio.h> #include<string.h> #define N 100 int main() { int i,s; char str[100] = {0}; gets(str); s = strlen(str); for(i = s-1; i >= 0; i --) printf("%c",str[i]); printf("\n"); return 0; }
Double click to view unformatted code.