Problem 9 complete - C
Very inefficient
Problem 10 complete - C