Course Content
Flowgorithm Expressions
Flowgorithm Expressions
0/1
Debug Flowgorithm Flowchart
Debug Flowgorithm Flowchart
0/1
Flowgorithm Control Statements
Flowgorithm Control Statements
0/1
Flowgorithm Loops
Flowgorithm Loops
0/1
Flowgorithm For Loop
Flowgorithm For Loop
0/1
Flowgorithm While Loop
Flowgorithm While Loop
0/1
Flowgorithm Do Loop
Flowgorithm Do Loop
0/1
Flowgorithm Nested Loops
Flowgorithm Nested Loops
0/1
Export Flowgorithm Flowchart
Export Flowgorithm Flowchart
0/1
Flowgorithm Intermediate
About Lesson

Loop Statements

Loops allow the repetition of statements in the flowchart. Consider the simple example of printing a hundred numbers. We must add a hundred output statements to the flowchart to print the numbers without loops. This will make the flowchart too big and look cumbersome.

Loop structures allow the repetition of statements. So, with a loop, we can add a single Output statement and iterate the loop a hundred times.

The Flowgorithm supports three loop statements. 

  • While Loop
  • For Loop
  • Do Loop

Flowgorithm Loop Statements

For Loop: The For loop executes a code block a specific number of times. It typically has an initialization, condition, and update expression. This loop is known as the definite loop.

While Loop: The While Loop executes a code block repeatedly until the loop condition is true. This loop is called an indefinite loop.

Do Loop: This is similar to the While loop, but the condition is evaluated after executing the code block, so it always executes at least once.