C++ Programming Code Examples C++ > Mathematics Code Examples Reverse of number means reverse the position of all digits of any number. Reverse of number means reverse the position of all digits of any number. For example reverse of 849 is 948. This code is write using for loop, modulus operator, if condition statement. Ask to User Enter any Number Receive Integer value from user Check Number is Greater than Zero Find Remainder of number Use reverse=reverse*10+remainer formula Find no=no/10 Print Result #include<iostream.h> #include<conio.h> void main() { int no,rev=0,r,a; clrscr(); cout<<"Enter the num: "; cin>>no; a=no; while(no>0) { r=no%10; rev=rev*10+r; no=no/10; } cout<<"\nReverse of "<<a<<" is: "<<rev; getch(); }