Solving problem 9. Test 2.