题解 | #数字颠倒#

数字颠倒

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

C++解题

#include <iostream>
using namespace std;
int main()
{
    int a;
    cin>>a;
    int b=a/10;
    while(b>0)
    {
        cout<<(a%10);
        a=b;
        b=a/10;
    }
    cout<<(a);
}
全部评论

相关推荐

05-20 21:57
已编辑
门头沟学院 Java
喜欢吃卤蛋的悲伤蛙在提需求:建信融通没消息吧,我2说有实习挂简历不理了
点赞 评论 收藏
分享
评论
点赞
收藏
分享

创作者周榜

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