#include #define IN 1 #define OUT 0 int main () { int c; int state; int len; // Keeps track of the length of the current word state = OUT; len = 0; while ((c = getchar()) != EOF) { if (c == ' ' || c == '\n' || c == '\t') { printf ("Word of length %d.\n", len); state = OUT; } else { state = IN; } } return 0; }