#include<stdio.h>
int inverse(int x)
{
int i,sum=0;
while(x>0)
{
sum=sum*10+x%10;
x/=10;
}
return sum;
}
int main()
{
int n,m;
scanf("%d",&n);
while(m=inverse(n),m!=n)
{
printf("%d ",n);
n=m+n;
}
printf("%d",n);//输出最后一次n
return 0;
}
02-04
4039
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)
04-02
2613
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)
09-23
364
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)
09-25
27万+
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)