Solve problems 14,16 using C++.