我自己写的 执行后 个数总是错的 还有8位数的个数。。。救命啊~~~!!!!
#include<stdio.h>
int main()
{int i,j=0,k=0,l=0,m=0,n=0;
char str0[151],str1[50],str2[50],str3[50];
gets(str1);gets(str2);gets(str3);
strcat(str0,str1);strcat(str0,str2);strcat(str0,str3);
for(i=0;str0[i]!='\0';i++)
{ if(str0[i]<='Z'&&str0[i]>='A')j++;
else if (str0[i]<='z'&&str0[i]>='a')k++;
else if (str0[i]<='9'&&str0[i]>='0') l++;
else if (str0[i]==' ')m++;
else n++; }
printf("大写英文字母有%5d个\n",j);
printf("小写英文字母有%5d个\n",k);
printf("数字有%5d个\n",l);
printf("空格有%5d个\n",m);
printf("其他字符有%5d个\n",n);
return 0;}