Flow Of Control
Determines the order in which instructions should be executed in.
The three control flow elements are:
- Sequence
- So far in the lectures and labs we have used sequence.
ex. one expression after another.
- Selection
go
orjump
to next instruction.- Loops
- going back and repeating the block until it becomes false.
Selection and Loops conditional statements:
Allows us to modify the order of execution for our instructions using boolean expression called condition
which evaluates to true or false
.
In another words, allowing us to decided which instruction will be executed first.