#include <stdio.h>
int main()
{
long a, b, c, d, x;
printf("请输入 5 位数字:");
scanf("%ld", &x);
a = x / 10000; //万位
b = x % 10000 / 1000; //千位
c = x % 100 / 10; //十位
d = x % 10; //个位
if (a == d && b == c) {
printf("这是回文数\n");
}
else {
printf("这不是回文数\n");
}
}
04-16
5514
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)
03-05
1247
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)