Code for problem 67B.