#include<iostream>
using namespace std;
int main()
{
int n, r, s = 0;
cout << "Enter A Number : ";
cin >> n;
cout << endl;
while(n != 0)
{
r = n % 10;
s = s * 10 + r;
n = n/10;
}
cout << "Reverse of Input Number : " << s << endl;
return 0;
}
using namespace std;
int main()
{
int n, r, s = 0;
cout << "Enter A Number : ";
cin >> n;
cout << endl;
while(n != 0)
{
r = n % 10;
s = s * 10 + r;
n = n/10;
}
cout << "Reverse of Input Number : " << s << endl;
return 0;
}
Comments
Post a Comment