Monday, May 6, 2013

Program To Find Reverse Of A Number

This is the program to find reverse of a given Number:

#include<iostream.h>
#include<conio.h>
void main()
{
int num,q,r;
cout<<"enter the number\n";
cin>>num;
cout<<"reverse of the number\n";
do{
q=num/10;
r=num%10;
cout<<r;
num=q;
}
while(num!=0);


getch();
 


Output:


No comments:

Post a Comment