Welcome..!!

Please visit http://csprograms.in/ for more Computer Science programs.

Showing posts with label reverse of a number. Show all posts
Showing posts with label reverse of a number. Show all posts

Tuesday, 13 March 2012

3. C++ program to find reverse a given number.


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