fork(1) download
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. string liczba;
  6. int i=0;
  7.  
  8. int main()
  9. {
  10. getline(cin,liczba);
  11. int dlugosc=liczba.length();
  12. for(int i=dlugosc-1; i>=0; i--)
  13. {
  14. cout<<liczba[i];
  15. }
  16.  
  17. return 0;
  18. }
Success #stdin #stdout 0.01s 5552KB
stdin
1 2 3
stdout
3 2 1