
2条回答 默认 最新
技术专家团-小桥流水 2021-11-11 14:51关注#include <stdio.h> int main() { int n,t,s=0; scanf("%d",&n); t = n; while(t) { s = s*10 + t%10; t/=10; } printf("%d",n+s); return 0; }本回答被题主选为最佳回答 , 对您是否有帮助呢?解决评论 打赏 举报无用 1
#include <stdio.h>
int main()
{
int n,t,s=0;
scanf("%d",&n);
t = n;
while(t)
{
s = s*10 + t%10;
t/=10;
}
printf("%d",n+s);
return 0;
}