Solve problem 53 using C++.