In this program, the user entered one integer value and it will find reverese of that number.
#include <iostream> using namespace std; int main() { int no, rev = 0, rem; cout << "Enter an integer value: "; cin >> no; while(no != 0) { rem = no%10; rev = rev*10 + rem; no /= 10; } cout << "Reversed Number = " << rev; return 0; }
OutPut
Enter an integer value: 31122000 Reversed number = 00022113