#include<stdio.h>
#include<stdlib.h>void main(){ char ch; int a=0,b=0,c=0,d=0; system("color 3E"); printf("输入字符\n"); ch=getchar(); while(ch!='\n') { if(ch>='A'&&ch<='z') a++; else if(ch==' ') b++; else if(ch>='0'&&ch<='9') c++; else d++; ch=getchar(); } printf("英文字母个数%d\n",a); printf("空格个数%d\n",b); printf("数字个数%d\n",c); printf("其他个数%d\n",d);}