#include<bits/stdc++.h> using namespace std; int main() { string a; while (getline(cin, a)) { for (int i = a.size() - 1; i >= 0; i--) { cout << a[i]; } cout << endl; } return 0; }
Double click to view unformatted code.