C++ Programming Exercises and Answers (Part 4)