#include<iostream>
#include<conio.h>
using namespace std;
int main()
{int digit,a,b,c,d;
cout<<"enter 5 digit number to reverse it"<<endl;
cin>>digit;
a=digit/10000;
digit=digit%10000;
b=digit/1000;
digit=digit%1000;
c=digit/100;
digit=digit%100;
d=digit/10;
digit=digit%10;
cout<<digit<<d<<c<<b<<a;
getch();
}
No comments:
Post a Comment