第1个回答 2020-05-19
#include#includeint 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]++;\t else if(s[i]==' ')a[2]++;\t else if(isdigit(s[i]))a[3]++;\t\t else a[4]++; printf("英文大写字母有%d个",a[0]); printf("英文小写字母有%d个",a[1]); printf("空格有%d个",a[2]); printf("数字有%d个",a[3]); printf("其它字符有%d个",a[4]); return 0;}