Add Problem 1 in C++