#include<iostream>
using namespace std;
//逆序
void Reverse(int *rev,int n){
if(n>=10){
cout<<"n:"<<n<<endl;
cout<<"n/10:"<<n/10<<endl;
Reverse(rev+1,n/10);
}
cout<<"-----------------"<<endl;
cout<<"Here it is"<<endl;
cout<<"n:"<<n<<endl;
cout<<"n%10:"<<n%10<<endl;
cout<<"-----------------"<<endl;
*rev=n%10;
}
int main(){
int number=123456789;
int result[20];
Reverse(result,number);
for(int i=0;i<9;i++){
cout<<result[i];
}
cout<<endl;
return 0;
}