Code for problem 53A.