added exercise 10.9 in the primer_chapter10_pair.cc