char word;
int count = 0;
int block = true;
while ((word = getchar()) != EOF)
{
if ( block == false && ((word >= 'A' && word <= 'Z') || (word >= 'a' && word <= 'z')))
{
block = false;
count += 1;
}
if (word == ' ' || word == '\n')
block = false;
else
{
block = true;
count += 0;
}
}
printf("WORDS:%d\n", count);