#include<stdio.h>
void main()
{
int a[5];
int usescanf;
printf("请输入一个五位数:");
scanf("%d",&usescanf);
a[0]=usescanf/10000;
a[1]=(usescanf-a[0]*10000)/1000;
a[2]=(usescanf-a[0]*10000-a[1]*1000)/100;
a[3]=(usescanf-a[0]*10000-a[1]*1000-a[2]*100)/10;
a[4]=(usescanf-a[0]*10000-a[1]*1000-a[2]*100-a[3]*10);
for(int i=0;i<=4;i++)
printf("a=%d
",a[i]);
printf("\n");
}
这样就行了!!