Wrote programs 3-7 from Chapter 3