ok. Good luck. Come back if you have more problems.
Type: Posts; User: Norm
ok. Good luck. Come back if you have more problems.
The end of the loop would be the } for a while loop.
The logic could be something like this:
init variables
begin loop
ask question
get response
if correct answer -> exit loop
print message describing wrong answer
end loop
You need to consider where the loop should be and when to exit the loop.
Basically:
stay in the loop until the right answer or the maximum guesses have been made.
Exit the loop with the correct...
With most loops, if the condition to end the loop is never reached, the loop goes forever.
With the loop in the code it will continue until (secondInput < firstInput) is false. For that to happen...