#include<stdio.h>
main(){
int k,l,m,n;
printf("请输入一个三位数");
scanf("%d",&k);
l=k/100;
m=k/10%10;
n=k%10;
printf("这个三位数的百位是:%d\n",l);
printf("这个三位数的十位是:%d\n",m);
printf("这个三位数的个位是:%d\n",n);
}
标签:10,k%,int,分离,三位数,printf,include
来源: https://blog.csdn.net/weixin_43560272/article/details/88933209