Créer une activité
Jouer Relier
1. Loop 1
2. Loop 2
3. Loop 3

guaranteed to execute at least one time.

While loop

can be thought of as a repeating if statement.

When the expression is tested and the result is false, the loop body will be skipped and the first statement after the____ loop will be executed.

do{ conditional code} while (condition)

for( int; condition; increment) { conditional code}

while( condition){ code }

a shorter, easy to debug structure of looping

similar to while loop with only difference that it checks for condition after executing the statements

repetition control structure that allows you to efficiently write a loop that needs to be executed a specific number of times.

also called Entry control loop

example of Exit Control Loop.

useful when you know how many times a task is to be repeated.

Do While Loop

Boolean expression appears at the end of the loop

For Loop

control flow statement that allows code to be executed repeatedly based on a given Boolean condition.