Solutions to some project Euler problems in c++