Added a solution to Problem 5. This solution is not optimized, and could do with a better solution at a later date.
Added a solution for Problem 6. This solution uses loops to solve. Have not checked for optimization