C++ program to find the reverse of a number. Posted by Niteesh kumar Thursday, May 08, 2014 Get link Facebook X Pinterest Email Other Apps #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(); } OUTPUT enter any no.=54 reverse no. is=45 Comments
Comments
Post a Comment