/*
 * K&R C Programming language
 * ---------------------------------------------------
 * Excersise 1-9
 *
 * Write a program to copy its input to its output, replacing
 * each string of one or more blanks by a single blank
 *
 */

#include <stdio.h>

int
main()
{
    int c;      /* current character */
    int pc;     /* previous character */

    while ((c = getchar()) != EOF) {
        if (c == ' ' && pc == ' ')
            continue;
        putchar(c);
        pc = c;
    }
}
