题目没申清楚...
#include <stdio.h>
#include <ctype.h>
int main()
{
int c, count = 0, last = EOF;
while((c = getchar()) != EOF)
{
if(c == '\n')
{
printf("%d\n", count);
count = 0;
last = EOF;
}
if(isalpha(c) && !isalpha(last)) count++;
last = c;
}
return 0;
}