fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5. int n,m=0;//164
  6. cin>>n;
  7. while (n)
  8. { int c=n%10;
  9. m=m*10+c;
  10. n=n/10;}
  11. cout<<m;
  12.  
  13. return 0;
  14. }
Success #stdin #stdout 0s 5320KB
stdin
164
stdout
461