Code for problem 117.