knr2: Completed exercise 1-24.