#include<conio.h>
#include<iostream.h>
void main()
{
clrscr();
int a, r=0 ,N;
cout<<"Enter The Number ";
cin>>N;
while(N>=1)
{
a=N%10;
r=r*10+a;
N=N/10;
}
cout<<"Reverse of The Number is "<<r;
getch();
}
#include<iostream.h>
void main()
{
clrscr();
int a, r=0 ,N;
cout<<"Enter The Number ";
cin>>N;
while(N>=1)
{
a=N%10;
r=r*10+a;
N=N/10;
}
cout<<"Reverse of The Number is "<<r;
getch();
}
No comments:
Post a Comment