635---536
1234---4321
//对一个整数进行倒置的操作
//使用do while来执行循环
#include <iostream>
using namespace std;
int main() {
int n,digit;
cout<<"enter the integer : ";
cin>>n;
cout<<"the number in reverse order : ";
do{
digit=n%10;
cout<<digit;
n=n/10;
}while(n!=0);
return 0;
}