// // Print the input one word per line. // K&R Exercise 1-12. // #include #define IN 0 #define OUT 1 int main() { int c; int state; state = OUT; c = getchar(); while (c != EOF) { if (c == ' ' || c == '\n' || c == '\t') { if (state == IN) { printf("\n"); } state = OUT; } else { printf("%c", c); state = IN; } c = getchar(); } return 0; }