Code for problem 68.
Code for problem 49.
Code for problem 31.
Code for problem 53.