solution to prob3

Solution is iterative
Problem 4 Solution
problem 5 solution