+ 1
Getting out of a loop
I'm stuck in a infinite loop when I enter a character. how to break out? https://code.sololearn.com/cY89OzDZ1gJU/?ref=app
3 Answers
+ 6
dont write return 0 but only return. else you can write the "break" command
+ 1
You should check the integer "num", not the input stream "cin".