Programming Challenge Chapter 6 #24