vPrograms must
frequently test if some condition holds, e.g. are two CDs in alphabetical
order
vConditional
statements have been invented to make tests
oIf temp
< 32 Then waterState = “frozen”
vGeneral form of
basic conditional:
oIf <T/F expression> Then
<assignment statement>
vThe meaning is that
the <T/F expression> is evaluated
oIf the outcome is
true, then the assignment statement is performed
oIf
the outcome is false, then the assignment statement is skipped