#include<stdio.h>
int turn(int number){
int weiShu=0;
int tempNumber=number;
while(tempNumber){
tempNumber/=10;
weiShu++;
}
int string[weiShu];
tempNumber=number;
int loop=0;
while(tempNumber){
string[loop++]=tempNumber%10;
tempNumber/=10;
}
int classNumber=1;
tempNumber=0;
for(loop=weiShu-1;loop>=0;loop--){
tempNumber+=string[loop]*classNumber;
classNumber*=10;
}
printf("倒序后: %d\n",tempNumber);
return tempNumber;
}
int main(){
int number;
printf("请输入整数: ");
scanf("%d",&number);
printf("反向数: %d\n",number+turn(number));
}