哪位高手帮我看下这个求一串字符中各类字符的个数的程序
# include "stdio.h"void main()
{
int i=1,law=0,cap=0,dig=0,spa=0,oth=0;
char a[10];
for(;i<=10;i++)
scanf("%d",&a[i]);
for(i=1;i<=10;i++)
{
if(a[i]>=97&&a[i]<=122)
law=law+1;
else if(a[i]>=65&&a[i]<=90)
cap=cap+1;
else if(a[i]>=48&&a[i]<=57)
dig=dig+1;
else if(a[i]=32)
spa=spa+1;
else
oth=oth+1;
}
printf("大写字母个数为%d小写字母个数为%d数字个数为%d空格个数为%d其他字符个数为%d"
,law,cap,dig,spa,oth);
}
哪里出错了呢