题解 | #反向输出一个四位数#
反向输出一个四位数
https://www.nowcoder.com/practice/1f7c1d67446e4361bf4af67c08e0b8b0
#include <stdio.h>
int main() {
int a,b=0;
scanf("%d",&a);
while(a)
{
b=(a%10)*10+b*10;
a/=10;
}printf("%.4d",b/10);
return 0;
}
查看10道真题和解析
