#include #define IN 1 /* внутри слова */ #define OUT 0 /* вне слова */ int main() { int c, nl, nw, nc, state; state = OUT; nl = nw = nc = 0; while ((c = getchar()) != EOF) { if (c == ' ' || c == '\n' || c == '\t'){ state = OUT; printf("%c \n",c); } else if (state == OUT) { state = IN; printf("%c",c); } else { printf("%c",c); } } return 0; }