while( condition){ code }
do{ conditional code} while (condition)
repetition control structure that allows you to efficiently write a loop that needs to be executed a specific number of times.
a shorter, easy to debug structure of looping
useful when you know how many times a task is to be repeated.
For Loop
Boolean expression appears at the end of the loop
Do While Loop
guaranteed to execute at least one time.
for( int; condition; increment) { conditional code}
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.
control flow statement that allows code to be executed repeatedly based on a given Boolean condition.
can be thought of as a repeating if statement.
similar to while loop with only difference that it checks for condition after executing the statements
While loop
also called Entry control loop
example of Exit Control Loop.