CBSE Class 6 Computer Science Chapter 20

CBSE Class VI Computer Science Chapter 20 – Control Statements

Statements that specify the order in which actions are executed are called control statements. The control statements available in QBASIC are GOTO, IF THEN and FOR NEXT. GOTO statement in QBASIC is used to transfer the program control from one statement to another. IF THEN statement in QBASIC is used for making decisions based on comparisons.

The statement tests a particular condition. If the condition evaluates to true, a statement (or a set of statements) that follows is executed. IF-THEN-ELSE statement in QBASIC is a conditional decision making statement. It provides a way to change program flow based on a test expression. If more choices are required in the IF THEN statement, then the ELSE-IF keyword is used.