Solution to Project Euler Problem #2 in C++