Solves Problem 13 in C++