Jolt. You need to be awake for this class.
You arrive at a restaurant for breakfast. The waiter takes your order. He notices your mental condition this early in the morning and patiently asks you what you wish to drink, item by item:
Each decision in this dialogue is a two-way decision. You can answer "yes," or you can answer "no." After answering several yes/no questions, the choice has been narrowed down to one item.
To pick one of several choices,
use the IF-THEN-ELSE-END IF
control structure the same way
the waiter used yes/no questions.
A choice of one from many can
be done as a series of yes/no choices.
This will work for any
number of possibilities.
There are many beverages on the breakfast menu. How many questions must the waiter ask to determine your preference?