CHAPTER EIGHT

PROGRAMMING LANGUAGE

8.3. Calculations

Print 5 +15

NOTE

 In order to print WORDS you need the ""'

Print figures with or without ""
+ Means to add up, do not use "" if you use print "5+10", you will get out put 5+10. So donot use "" when doing calculations in Basic
To add 5 and 15 in Qbasic employ the following strategies.

Step 1

Open Qbasic window

Step 2

Type PRINT 5+15

Step 4

Press F5. 20 will appear on your screen as in the picture below.

8.4. Qbasic commands

8.4.1. CLS command

The command CLS is means to clear the Screen. This command clears the previous output from your screen.

Example

"WELLCOME TO JALINGO TARABA STATE"

Step 1

Type-

CLS
Print "WELLCOME TO JALINGO TARABA STATE"

Step 2

Leave the first command. And beneath it type
CLS
"COLLEGE OF EDUCATION JALINGO TARABA STATE NIGERIA"


Click to page55 Page56 Click to page 57
Copyright2016@Digital Vision Jalingo. Nigeria
www.digitalvision.net.ng