
#include<stdio.h>
int
main(
void
)
{
int
x=0;
int
num=0;
int
space=0;
int
other=0;
char
ch;
while
((ch=
getchar
())!=
'\n'
)
{
if
((ch>=
'a'
&&ch<=
'z'
)||(ch>=
'A'
&&ch<=
'Z'
))
x++;
else
if
(ch>=
'0'
&&ch<=
'9'
)
num++;
else
if
(ch==
' '
)
space++;
else
other++;
}
printf
(
"%d %d %d %d\n"
,x,num,space,other);
return
0;
}
分类统计个数