题解 | #数字颠倒#
数字颠倒
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);
}