C++ Program to display a number's digits reversed.

C++ 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();
}


Learn More :