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