Advertisement
Guest User

Untitled

a guest
Jun 26th, 2019
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.20 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. int main() {
  6. int n, d;
  7. cin >> n;
  8. int r = 0;
  9. while (n > 0) {
  10. d = n % 10;
  11. n = n / 10;
  12. r = r * 10 + d;
  13. }
  14. cout << r;
  15.  
  16. int t;
  17. cin >> t;
  18.  
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement