Loading, please wait...

Program Controls

Loops Structures:

 

Loop Type

Description

While loop

Repeats a statement or group of statements while the given condition is true. It tests the condition before executing the loop body.

For loop

Executes a sequence of statements multiple times and abbreviates the code that manages the loop variable.

Do… while loop

It is more like a while statement, except that it tests the condition at the end of the loop body.

Nested loops

You can use one or more loops inside any other while, for, or do..while loop.