C++ program to find the reverse of a number. Niteesh kumar May 08, 2014 #include<iostream.h>#include<conio.h>void main(){clrscr();intr,n,rev=0;cout<<"enter any no.=";cin>>n;do {r=n%10;rev=10*rev+r; n=n/10; }while(n!=0);cout<<"reverse no. is="<<rev;getch(); }OUTPUTenter any no.=54reverse no. is=45 Comments :
Comments :
Post a Comment