I'm working on code for a program and am stuck trying to cleanly get out of my loop. Here's the code:
I'm trying to figure out a way out of the loop with out having the cout show up again. I'm sure I'll probably figure it out in the morning with a fresh nights sleep but will take any suggestions. I still need to clean the code up a bit too.
Of course, then there's no reason to have a loop condition at all. Better would be to structure the loop so that the block of code you currently have after the if/else if construction is above it, perhaps in a do/while loop.