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

19 lines
204 B
C
Raw Normal View History

2024-10-16 03:19:34 +00:00
#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;
}