knr2: Completed exercise 5-10.