题解 | #数字颠倒#

数字颠倒

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

#include <stdio.h>
//第一次直接打完无修改,一次过,纪念一下
int main() {
    int n;
    scanf("%d",&n);
    int a;
    if(n==0)
    {
        printf("%c",'0');
    }
    while(n!=0)
    {
    a=n%10;
    printf("%d",a);
    n=n/10;
    }

}

全部评论

相关推荐

程序员牛肉:这一眼假啊,基本上都是骗人的,不然就涉及到职位贪腐了,就像之前华为的OD事件,看你运气好不好了
点赞 评论 收藏
分享
05-22 09:23
门头沟学院 Java
点赞 评论 收藏
分享
评论
点赞
收藏
分享

创作者周榜

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