Code for problem 75D.