#include<stdio.h>
void main()
{
int n, m, x = 0;
printf("请输入一个正整数:\n");
scanf("%d", &n);
m = n;
while (n>0)
{
x = x * 10 + n % 10;
n = n / 10;
}
if (x == m)
printf("yes");
else
printf("no");
}
任意输入一个数,判断这个数是否为回文数
猜你喜欢
转载自blog.csdn.net/qq_42052733/article/details/104504761
今日推荐
周排行