Solve problems 1-10 using C++.