fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5. int num, a, b, c, d;
  6. cin >> num;
  7. a = num % 10;
  8. b = num / 10 % 10;
  9. c = num / 100 % 10;
  10. d = num / 1000;
  11. cout << a<< b << c << d;
  12. return 0;
  13. }
Success #stdin #stdout 0s 4564KB
stdin
Standard input is empty
stdout
46011