#include <iostream> #include <string.h> using namespace std; int main(){ char c[101]; gets(c); int len = strlen(c); for(int j=len-1;j>=0;j--){ printf("%c",c[j]); } return 0; }
Double click to view unformatted code.