my answers for the book "Problem Solving with C++ 7th Edit."