brute force solution to project Euler, question #5, in C