fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5. string s;
  6. cin>>s;
  7. for(int i=s.length()-1; i>=0; i--) {
  8. cout<<s[i];
  9. }
  10. return 0;
  11. }
Success #stdin #stdout 0s 4292KB
stdin
1234
stdout
4321