Anonymous user
Conditional structures: Difference between revisions
→If Then Else.if Else
(added Ol) |
|||
Line 2,916:
Print "Bottom"
}
}
CheckIt 100
CheckIt 0
CheckIt -100
Module CheckIt {
Read a
\\ using end if without blocks
If a>1 then
Print "Top"
else.if a>=-4 then
Print "Middle"
else
Print "Bottom"
End If
}
CheckIt 100
CheckIt 0
CheckIt -100
Module CheckIt {
Read a
\\ without use of END IF in one line
If a>1 then Print "Top" else.if a>=-4 then Print "Middle" else Print "Bottom"
}
CheckIt 100
|