Solve problems 39,48 using C++.