Code for problem 22.
Code for problem 84.