数字颠倒C++
数字颠倒
http://www.nowcoder.com/questionTerminal/ae809795fca34687a48b172186e3dafe
#include<iostream> using namespace std; int main() { int n; cin>>n; while(n>0) { cout<<n%10; n/=10; } return 0; }
数字颠倒
http://www.nowcoder.com/questionTerminal/ae809795fca34687a48b172186e3dafe
#include<iostream> using namespace std; int main() { int n; cin>>n; while(n>0) { cout<<n%10; n/=10; } return 0; }
相关推荐