Project Euler C Implementation