Control Structures

Control structures alter program flow.

If Statements

../_images/fig15.jpg

Switch Statements

../_images/fig16.jpg

While Loops

../_images/fig17.jpg

For Loops

../_images/fig18.jpg

Break and Continue

These are useful commands for conditional statements and loops.

break - exits the current statement or loopcontinue - skips the current iteration of the loop and continues with the next