Exercise 1.18

Program which takes text input, removes trailing blanks and spaces from
each line and omits completely blank lines.