#include <iostream>
int main() {
int n;
std::cout<<" enter a number : "<<std::endl;
std::cin>>n;
int x;
x = 0;
int y;
while ( n>0){
y = n%10;
x = x *10;
x = x + y;
n = n/10;
}
std::cout<<x;
return 0;
}
To embed this project on your website, copy the following code and paste it into your website's HTML: