Completed exercise 10 of Stream Adventure.