fork download
  1. #include <iostream>
  2. #include <string>
  3.  
  4. int main()
  5. {
  6. std::string reverse = "";
  7. int input = 194;
  8.  
  9. while(input)
  10. {
  11. reverse += input % 10 + '0';
  12. input /= 10;
  13. }
  14.  
  15. std::cout << reverse << std::endl;
  16.  
  17. return 0;
  18. }
  19.  
Success #stdin #stdout 0s 3272KB
stdin
Standard input is empty
stdout
491