Enter 1 if you are hungry; 0 if you are not ? 1 Buy Cookies Keep Shopping
The true branch was not skipped because the answer to the question
IF HUNGER > 0 THEN
was true.
Here is the program again:
PRINT "Enter 1 if you are hungry; 0 if you are not" INPUT HUNGER ' IF HUNGER > 0 THEN PRINT "Buy Cookies" ' true branch END IF ' PRINT "Keep Shopping" ' this statement is always done END
And here is the program as a chart:
Look at both the program and the chart to see how they correspond.
Say that the user enters a 0. What will the program will print?