Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- void invers(int n, int &x)
- {
- x=0;
- while(n)
- {
- x=x*10+n%10;
- n=n/10;
- }
- }
- int main()
- {
- int n=9545, x=0;
- invers(n,x);
- cout<<x;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement