题解 | #数字颠倒#
数字颠倒
https://www.nowcoder.com/practice/ae809795fca34687a48b172186e3dafe
#include <stdio.h> int main() { int a; scanf("%d", &a); if(a == 0){ printf("%d", a); return 0; } while(a != 0){ printf("%d", a%10); a/=10; } return 0; }
数字颠倒
https://www.nowcoder.com/practice/ae809795fca34687a48b172186e3dafe
#include <stdio.h> int main() { int a; scanf("%d", &a); if(a == 0){ printf("%d", a); return 0; } while(a != 0){ printf("%d", a%10); a/=10; } return 0; }
相关推荐