#include <stdio.h>
int main()
{
char c;
int shuzi,yingwenzimu,kongge,qitazifu;
shuzi=yingwenzimu=kongge=qitazifu=0;
printf("qingshuruyigezifuchuan\n");
while(scanf("%c",&c),c!='\n')
{
if(c>='0'&&c<='9')
{++shuzi;}
if(c>='a'&&c<='z')
{++yingwenzimu;}
else if(c==' ')
{++kongge;}
else
++qitazifu;
}
printf("%d %d %d %d",shuzi,yingwenzimu,kongge,qitazifu);
return 0;
}
数字统计之后英文统计之前 少一个else像这样就可以了