Advertisement
Dizzy3113

Untitled

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