Project Euler problems in c++