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