Add a C++ solution to problem 11