1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
#include <stdio.h> int main() { int c, nb; char inWord = 0; while ((c = getchar()) != EOF) { if (c == ' ' || c == '\n' || c == '\t') { inWord = 0; } else if (inWord == 0) { putchar('\n'); inWord = 1; } putchar(c); } return 0; }