#include <stdio.h> #include <ctype.h> #define IN 1 #define OUT 0 int main() { int c, state; state = OUT; while ((c = getchar()) != EOF) { if (!isspace(c)) { state = IN; putchar(c); } else if (state == IN && isspace(c)) { state = OUT; putchar('/n'); } else state = OUT; } return 0; }