Professional Documents
Culture Documents
Chapter 8
Chapter 8
CLASS 6
Computer Science(2021-22)
Study Material
QBasic: It stands for ‘Quick Beginners All Purpose Symbolic Instruction Code’, a
ii) It is one of the most accepted languages because it is a flexible language in which
Variable: A variable is used to store values in a program. In QBasic, you can store two
2. String: To store alphabets, such as name and address. Strings are declared using the
$(dollar) sign. You can also use numbers in string which do not require calculations.
CLS statement: The CLS statement allows you to clear the output screen.
REM statement: The REM statement is used to give comments. Comments are
explanatory statements included in the code and help anyone to understand the
code.
LET statement: The LET statement is used to assign the value of an expression to
a variable.
INPUT statement: The INPUT statement is used to prompt the user to enter the value
PRINT statement: The PRINT statement is used to display the output of the program
on the screen.
END statement: The END statement stops the further processing of the QBasic
statements.
1.) Write a QBASIC program to input two numbers and print their subtraction.
CLS
LET S= A-B
END
2.) Write a program to input side of a square and print area and perimeter
of a square.
CLS
LET perimeter=4*S
END
CLS
END