0
Is there a way to make the input "Quit" break out of the while loop rather than restart it?
6 Respuestas
+ 1
Add a variable called “hasQuit” equal to false. Put it to true when the user presses quit. At the end of the while loop, have an if statements checking if hasQuit is true. If it is, break again.
+ 1
Yes
0
You could use return; if it’s the end of the function
0
Unfortunately, there is no function in question, however.
0
I want to break out of a while loop while in a smaller switch statement whithin the loop. When I use break, it breaks out of the switch statement.
0
can you assign boolean values to variables?