Added C++ solution to Problem 29