题解 | 23年OPPO-a的翻转

23年OPPO-a的翻转

https://www.nowcoder.com/practice/dcce2d0cc8f740c29e0885df96c9d625

#include <stdio.h>

int main() 
{
    int a=0,b=0;
    scanf("%d",&a);
    int c=a;
    while (c) 
    {
        int mod=c%10;
        b=b*10+mod;
        c/=10;
    }
    printf("%d",a+b);
    return 0;
}

全部评论

相关推荐

评论
点赞
收藏
分享

创作者周榜

更多
牛客网
牛客网在线编程
牛客网题解
牛客企业服务