Solved problem with question 8

Added cin.get() to fix the issue.
Chapter 5 done

Finished chapter 5 of C++ primer plus by Stephen Prata.