Code for problem 44C.