Loops

Objective #1: Explain the importance of loops in programs.

Objective #2: Use for loops.

for(initializing expression; control expression; step expression)
{

       one or more statements
}

Objective #3: Use while loops.

Objective #4: Use the break and continue statements with loops appropriately.

Objective #5: Use nested loops effectively when appropriate.

Objective #6: Use flag variables and sentinel values to control indeterminate loops.

Objective #7: Identify loop invariants.

You will not be tested on any material below this sentence in the lecture notes. However, the information is useful for serious, advanced students.

Objective #8: Use do while loops.