While Loops
While Loops
Syntax:
Example:
We need to make this condition false
eventually:
This will print 3, 9, 12
Due to the continue statement the loop restarts but the value is still 9, after that 3 is added and as the print is at the end it will print 12
Once this is printed loop restarts goes to 12 < 10 and breaks the loop, but it is too late, 12 is already printed
Last updated