Code for problem 26.