fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5. char x[64];
  6. int length=0;
  7. while(cin>>x[length]) {
  8. length++;
  9. }
  10. for(int i=length-1; i>=0; i--) {
  11. cout<<x[i];
  12. }
  13. return 0;
  14. }
Success #stdin #stdout 0s 4260KB
stdin
12345
stdout
54321