C++ Programming Code Examples C++ > For Loops and While Loops Code Examples Reverse of any Number Using for loop Reverse of any Number Using for loop #include<iostream.h> #include<conio.h> void main() { int no,rev=0,r,a; clrscr(); cout<<"Enter any numb: "; cin>>no; a=no; for(;no>0;) { r=no%10; rev=rev*10+r; no=no/10; } cout<<"\nReverse of "<<a<<" is: "<<rev; getch(); }