K&R Exercise 1-18