maybe this will work.
Code:#include<iostream> #include<conio.h> using namespace std; main() { int number,a,a1,b,b1; cout<<"Enter a three digit number"<<endl; cin>>number; //Let the number be 123 a=number/100;//1 a1=number%100;//23 b=a1/10;//2 b1=a1%10;//3 cout<<"The reverse of the entered number is "<<b1<<b<<a; getch(); return 0; }