#include <stdio.h>
#include <stdlib.h>
#define IN 1
#define OUT 0
int main()
{
int state;
state=OUT;
char ch;
int count=0;
while((ch==getchar())!=EOF){
if(ch==' '||ch=='\n'||ch=='\t')
state=OUT;
else if(state=OUT){
count++;
state=IN;
}
}
printf("%d\n",count);
return 0;
}
单词计数
最新推荐文章于 2023-11-05 14:17:54 发布