Updated - Exercise 1-13, Section 1.6, page 24 (pseudocode added)