TestingDocs.com
Software Testing website
  • Automation
    • Selenium
    • JBehave Framework
  • Tutorials
    • MySQL Tutorials
    • Testlink
    • Maven
    • Git
  • IDEs
    • IntelliJ IDEA
    • Eclipse
  • Flowcharts
    • Flowgorithm
    • Raptor
  • About

Flowgorithm

Flowgorithm For Loop Statement

Flowgorithm

Overview

In this tutorial, we will learn For loop statement in Flowgorithm flowchart. Loop structure in a flowchart executes a set of statements or instructions multiple times based on some conditions.

For Loop

For loop is a repetitive structure. A For loop is a definite loop. It is best suited when we know how many times we need to run the loop.

 

For Loop Statement Flowgorithm

 

To add the For loop construct, right click the mouse on the control line and choose the For symbol.

 

For Loop Flowgorithm

 

To define the loop construct double click on the for symbol. This will launch the For Properties window. Fill this window with the For loop properties. These properties decide how the For loop will run.

Loop variable:

The variable name used for the For loop iterations.

Start value:

The initial value of the For loop variable.

End value:

The end value of the For loop variable. The For loop terminates when the loop variable reaches this value.

Direction:

Increasing / Decreasing

Step By:

Loop variable Step value. The value of the loop variable to be increased/decreased for the next iteration.

 

For Properties Flowgorithm

 

Example

Let’s take a simple example to print numbers from 1 to 20 to the console window. Imagine without For loop we have to use the Output statements 20 times in the flowchart to print the numbers.

Define a loop variable : counter.

Add a For loop.

Define the Loop structure as shown.

In the loop add an Output statement to print the value of the loop variable : counter.

Sample Output

Execute the flowchart.

 

For Loop Example Output

—

Flowgorithm Tutorials

Flowgorithm tutorials on this website:

https://www.testingdocs.com/flowgorithm-flowchart-tutorial/

Flowgorithm Website

More information on Flowgorithm, visit the official website:

http://flowgorithm.org/

Related Posts

Print Triangle Pattern Flowchart

Flowgorithm /

Print Triangle Pattern Flowchart

Flowgorithm Breakpoint Symbol

Flowgorithm /

Flowgorithm Conditional Breakpoint Statement

File Read Declare Variables

Flowgorithm /

Flowgorithm Read Numbers from File Example

File Search Input File Flowgorithm

Flowgorithm /

Search Text File Flowchart Example

Flowgorithm Turtle Graphics Symbols

Flowgorithm /

Flowgorithm Turtle Graphics Symbols

‹ Flowgorithm Symbols› Flowgorithm While Loop Statement

Recent Posts

  • Update draw.io on Windows
  • Install RAPTOR Avalonia on CentOS
  • Download RAPTOR Avalonia Edition on Windows
  • npm doctor command
  • Build & Run CLion Project
  • Create New CLion C Project on Windows
  • Configure CLion Toolchains on Windows
  • Launch CLion IDE on Windows
  • Activate CLion IDE
  • CLion IDE for C/C++ Development

Back to Top

Links

  • Contact
  • Privacy Policy
  • Cookie Policy

www.TestingDocs.com