Solution for problem 8
Solution for problem 9
Solution for problem 10