Project Euler in C++