题解 | #牛牛逆序输出#
牛牛逆序输出
https://www.nowcoder.com/practice/d981181ce18e4cce945fdf52daf037a1
#include <stdio.h> int main() { int n = 0; int sum = 0; scanf("%d", &n); while (n) { sum = n % 10 + sum; if (n < 10) { break; } sum *= 10; n /= 10; } printf("%d", sum); return 0; }