Add new solution for problem 14 in C++