1
0
mirror of https://github.com/renbaoshuo/202401-programming-assignments.git synced 2024-11-27 14:36:19 +00:00
202401-programming-assignments/【实践课内】1.顺序结构/7-2 逆序的三位数.c

19 lines
204 B
C

#include <stdio.h>
int x;
int main() {
scanf("%d", &x);
int res = 0;
while (x) {
res = (res * 10) + (x % 10);
x /= 10;
}
printf("%d\n", res);
return 0;
}