An Introduction to Dragon/Lessons/Control Structures

Control Structures
In this chapter we are going to learn about the control structures provided by the Dragon programming language.

Branching

 * If Statement

Syntax:

Example:

Looping

 * While Loop

Syntax:


 * For Loop

Syntax:

Example:


 * Foreach Loop

Syntax:

Example:

Do While Loop
Syntax:

Example: