int main(){
int number; short position1,position2,position3,position4 ; printf("请从键盘输入number的值:");
scanf("%d",&number); position4 =number/1000; position2 =number%100/10;
position3 =number%1000/100;
position1 =number%10; printf("number中个位上的数字是%d\n", position1); }
printf("number中十位上的数字是%d\n", position2); printf("number中百位上的数字是%d\n", position3); printf("number中千位上的数字是%d\n", position4); return 0;