#include <stdio.h>
#include <stdlib.h>
int main()
{
int a=0,b=0,c=0,d=0,ch;
while((ch=getchar())!='\n')
{
if(ch>='0'&&ch<='9')
a++;
else if((ch>='a' && ch<='z')||(ch>='A' && ch<='Z'))
b++;
else if(ch==' ')
c++;
else
d++;
}
printf("数字个数为: %d\n", a);
printf("字母个数为: %d\n", b);
printf("空格个数为: %d\n", c);
printf("其他字符个数为: %d\n", d);
system("pause");
return 0;
}