Answer:

Not correct. The sentence needs another parenthesis, as below:

Here is a sentence (which might not be correct (or might be) ) which illustrates balancing.

Back to QBasic

The important think to remember from the above discussion is how brackets like DO...LOOP and IF...END IF show what statements are being controlled. They match up like parentheses in written English or algebra. Here is an example program:

PRINT "Enter the number of repeats"
INPUT LIMIT
LET COUNT=1

DO WHILE COUNT<= LIMIT
  IF COUNT < LIMIT / 2 THEN
    PRINT "Hello"
  ELSE
    PRINT "Mars"
LOOP
PRINT "Done"
END IF

END

QUESTION 18:

Is the example program correct? (Just check if the brackets match correctly. Don't worry about what the program does.)