Code for problem 26C.
Code for problem 27A.