#include<stdio.h>
int main()
{
	char ch;
	int a=0,b=0,c=0,d=0,e=0;
	printf("Input a string:");
	while((ch=getchar())!='\n')
	{
		if(ch>='a'&&ch<='z')
		a++;
		else if(ch>='A'&&ch<='Z')
		b++;
		else if(ch>='0'&&ch<='9')
		c++;
		else if(ch==' ')
		d++;
		else
		e++;
		
		
	}
	printf("大写字母数是:%d\n",b);
		printf("小写字母数是:%d\n",a);
			printf("空格为:%d\n",d);
				printf("数字为:%d\n",c);
					printf("其他字符为:%d\n",e);
}