Problem 28 Project Euler in C