Adding solution for problem 10 in c.
Used same prime optimization from 7 to speed up solution from 8 minutes to 45 seconds.