POSITION:028,114
COLOUR:STANDARD
TEXT:00,A demo program is available to demonstrate a series of "if" statement
TEXT:16,examples. But before you run the demo, view the source to see if you can
TEXT:16,guess which of the puts() lines will be printed.
TEXT:32,The "if" statement can be used to execute a group of statements for both
TEXT:16,false and true outcomes of a condition. One way to do this is to write a
TEXT:16,second "if" statement that checks for the opposite of the first "if"
TEXT:16,statement.
COLOUR:EUPHORIA
TEXT:32,if speed > 65 then
TEXT:16,     puts(1,"You are driving too fast!\n")
TEXT:16,end if
TEXT:32,if speed <= 65 then
TEXT:16,     puts(1,"Thank you for driving within the speed limit!\n")
TEXT:16,end if
