Code for problem 112.
Code for problem 113.
Code for problem 46.
Code for  problem 47.