fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. const int TEN = 10;
  5.  
  6. int main() {
  7. int a;
  8. cin >> a;
  9. int reverseA = 0;
  10. while (a) {
  11. reverseA = reverseA * TEN + a % TEN;
  12. a /= TEN;
  13. }
  14. cout << reverseA;
  15. return 0;
  16. }
Success #stdin #stdout 0.01s 5276KB
stdin
Standard input is empty
stdout
76723