I have some code which asks the user to guess the answer to a calculation, and then either tells them they are correct or tries to identify where they went wrong. I have used a while loop in this but sometimes it gets stuck, is there a way to add a counter to the guesses taken, and to break the while loop after 5 incorrect guesses?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…