===========================================================================
CODING
#include<conio.h>
#include<iostream.h>
#include<math.h>
void main()
{
clrscr();
int b,c,d,e,f;
long a,q;
cout<<"Enter any five digit number:- ";
cin>>a;
b=a%10;
a=a/10;
c=a%10;
a=a/10;
d=a%10;
a=a/10;
e=a%10;
a=a/10;
f=a%10;
a=a/10;
q=(b*10000.0)+(c*1000.0)+(d*100.0)+(e*10.0)+f;
cout<<"\n The reverse number is:- "<<q;
getch();
}
CODING
#include<conio.h>
#include<iostream.h>
#include<math.h>
void main()
{
clrscr();
int b,c,d,e,f;
long a,q;
cout<<"Enter any five digit number:- ";
cin>>a;
b=a%10;
a=a/10;
c=a%10;
a=a/10;
d=a%10;
a=a/10;
e=a%10;
a=a/10;
f=a%10;
a=a/10;
q=(b*10000.0)+(c*1000.0)+(d*100.0)+(e*10.0)+f;
cout<<"\n The reverse number is:- "<<q;
getch();
}
===========================================================================
No comments:
Post a Comment