Exercise 1-10 K&R2