题解 | #数字颠倒#
数字颠倒
http://www.nowcoder.com/practice/ae809795fca34687a48b172186e3dafe
#include<stdio.h> #include<string.h> int main() { int n; char ch; while(scanf("%d",&n)!=EOF) { if(n) { while(n!=0) { ch = n%10+'0'; printf("%c",ch); n/=10; } printf("\n"); } else printf("%d",n); } return 0; }