Code for problem 65A.