#include<stdio.h>
#include<ctype.h>
int main()
{int i,a[5];
char s[200];
gets(s);
for(i=0;s[i];i++)
if(isupper(s[i]))a[0]++;
else if(islower(s[i]))a[1]++;
else if(s[i]==' ')a[2]++;
else if(isdigit(s[i]))a[3]++;
else a[4]++;
printf("英文大写字母有%d个\n",a[0]);
printf("英文小写字母有%d个\n",a[1]);
printf("空格有%d个\n",a[2]);
printf("数字有%d个\n",a[3]);
printf("其它字符有%d个\n",a[4]);
return 0;
}
![](https://video.ask-data.xyz/img.php?b=https://iknow-pic.cdn.bcebos.com/14ce36d3d539b6004781ee6ee350352ac75cb798?x-bce-process=image%2Fresize%2Cm_lfit%2Cw_600%2Ch_800%2Climit_1%2Fquality%2Cq_85%2Fformat%2Cf_auto)