C++ code to find the solution to problem 9 of Project Euler