Solving some Project Euller problems while self-learning C++