#include<stdio.h>
void main(){
void isHuiWen(int x);
int a;
printf("输入一个数");
scanf("%d",&a);
isHuiWen(a);
}
void isHuiWen(int x) {
int i = 0 , sum = 0 , j, finalx;
int a[10];
finalx = x;
while(x != 0){
*(a + i) = x % 10;
x = (x - *(a + i)) / 10;
i++;
}
for(j = 0; j < i ; j++){
sum = sum*10 + *(a + j);
}
printf("sum = %d \n", sum);
if ( finalx == sum) {
printf("这是回文!\n");
} else {
printf("这不是回文!\n");
}
}