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