fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5. string s, oglindit;
  6. cin >> s;
  7. for (int i = s.size() - 1; i >= 0; --i) {
  8. oglindit += s[i];
  9. }
  10. cout << oglindit;
  11. return 0;
  12. }
Success #stdin #stdout 0s 5292KB
stdin
Popa
stdout
apoP