I tried to copy pasted all the codes below (even after the else's break) but it takes too much space and it ended up failed.
CodePudding user response:
you have to put the input at the start of the while loop since it should get an input every loop i guess. right now it gets an input once and then always does the same action or breaks out of the while loop immediately