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