Sunday, December 02, 2012

REVERSE NUMBER PROGRAM in C++


#include<iostream.h>
 #include<conio.h>

int main()
 {
 int num;

 int rev=0;
 int mod;
 cout<<"Enter Number= ";
 cin>>num;
 do
 {
 mod=num%10;
 rev=(rev*10)+mod;
 num=num/10;
 }
 while(num>=1);
 cout<<"Reverse Is= "<<rev;
 getch();
 }

No comments:

Post a Comment