chap4 practice

includes avgofthree and distanceconverter