Trying to learn c++ using Pearsons C++ How to program book.
I'm currently stuck on this question from chapter 5. I have to use a sentinel value to end the loop and also use a switch statement inside the loop.
I typed up the following program but it keeps hanging at the end and I can't figure it out. Any help would be appreciated.
The program compiles without errors but when run it hangs after the sentinel value is typed in and fails to print out the final 'cout' statement. I've moved the statement within the loop to check it and it works but not outside the loop.