Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //Program to display a number's digits reversed.
- #include<iostream.h>
- #include<conio.h>
- void main()
- {
- clrscr();
- int a;
- cout<<"Enter a number to display it's digits reversed: ";
- cin>>a;
- a=(a%10)*(10)+(a/10);
- cout<<"The reversed number is: "<<a;
- getch();
- }
Advertisement
Add Comment
Please, Sign In to add comment