Code for problem 98.