Programming Course for Beginners - ZedLX

The Easiest Online Computer Programming Course, for Free

while Loop and Keyboard [10/11]

The condition of the while loop is always true, therefore the loop never ends.

That makes an infinite loop. It cannot ever end, so the program keeps executing forever.

The 'Exit' button can end such programs immediately.

Run the program, and then use the 'Exit' button to terminate the program.

Note that the final statement will never be executed, therefore it can be deleted from the source code.

Loading...