knr2: Completed exercises 3-05 and 3-06.