Answers

2014-06-17T13:10:50+05:30
#include<iostream.h>
#include<conio.h>

void main()
{
clrscr();
long n,rev=0,d;
cout<<"Enter the number:";
cin>>n;

while(n!=0)
{
d=n%10;
rev=(rev*10)+d;
n=n/10;
}

cout<<"The reversed number is "<<rev;
getch();
}

0