QBasic is a programming language, created by Microsoft. It is based upon the original language BASIC (Beginners All-purpose Symbolic Instruction Code).
Control Statements
A program consists of a number of statements which are usually executed in sequence. Control statements allow you to change the computer's control from automatically reading the next line of code to reading a different one. The Control Statements are used for controlling the Execution of the program
There are three types of loops for QBASIC.
WHILE [condition]
[Statement Block]
WEND
Example
Control Statements
A program consists of a number of statements which are usually executed in sequence. Control statements allow you to change the computer's control from automatically reading the next line of code to reading a different one. The Control Statements are used for controlling the Execution of the program
There are three types of loops for QBASIC.
- While..Wend
- Do Loop
- For Loop
WHILE [condition]
[Statement Block]
WEND
Example
CLS
B=1
WHILE B<=9
PRINT B
B=B+1
WEND
END
0 comments:
Post a Comment