after manipulating an existing program from a book to get a word count, i get a proper count only if i type a space as a first entry. if i start typing immediately after running this program i get 1 less word in my count. .. and now for the unexpected question........................why ?

#include <stdio.h>

#define IN 1 /* inside a word */
#define OUT 0 /* ouside a word */

main()
{
int c, other, word, state;
other = word = 0;
while((c = getchar()) != EOF) {
;
if (c == ' ' || c == '\n' || c == '\t')
state = OUT;
if (state != OUT)
++word;
}
printf("%d \n", word);
}