finished problem 9

man, i'm terrible at math.