Template:Computer Programming/Control/10

From Wikibooks, open books for an open world
Jump to navigation Jump to search

Loop with condition in the middle[edit]

Sometimes you need to first make a calculation and exit the loop when a certain criterion is met. However when the criterion is not met there is something else to be done. Hence you need a loop where the exit condition is in the middle.