#include<stdio.h>
#include<math.h>
int main()
{
int judgment(int n);
int i;int count = 0;
for (i = 1; i < 10000; i++)
{
if (judgment(i))
{
count++;
printf("%d \n", i);
}
}
printf("合计:%d个 \n", count);
printf("\n");
getch();
return 0;
}
int judgment(int n) //判断是否为回文数
{
int m = 0;
int t = n;
while (t)
{
m = m * 10 + t % 10;
t /= 10;
}
return m == n;
}