k&r; exercise 1.12 - one word per line