问题:翻转数字分析:注意初始化
class Solution { public: int reverse(int x) { int y=0; while(x) { y=(y*10)+x%10; x/=10; } return y; } };
Reverse Integer,布布扣,bubuko.com
Reverse Integer
原文:http://www.cnblogs.com/zsboy/p/3885645.html