Added C++ source for Problem 5