Write ask if customer wants coffee in QBasic.

Answer:

PRINT "Do you want coffee? (Answer YES or NO)"
INPUT ANSWER$

First Decision

The user is asked a question and told what answers the program expects. For this program to work the user must answer using capital letters. The program now looks like this:

PRINT "Do you want coffee? (Answer YES or NO)"
INPUT ANSWER$

IF customer wants coffee THEN
  charge for coffee

ELSE
  ' decide between tea and milk
  ask if customer wants tea
  IF customer wants tea THEN
    charge customer for tea
  ELSE
    charge customer for milk
  END IF

END IF

END

QUESTION 6:

Complete the statement:

IF customer wants coffee THEN

(Hint: use "=" to compare the variable ANSWER$ with "YES".