What is the function key to execute Qbasic program?

1 answer

Answer

1285923

2026-07-20 05:25

+ Follow

QBASIC operators are listed as follows.../along with some example QBASIC code...

->LOGICAL OPERATORS

AND

OR

NOT

EXAMPLE QBASIC CODE:-

A=1

B=1

IF (A AND B) THEN PRINT "Result: True" ELSE PRINT "Result: False"

...output...

Result: True

A=1

B=2

IF (A AND B) THEN PRINT "Result: True" ELSE PRINT "Result: False"

...output...

Result: False

-> MATHEMATICAL OPERATORS

+ plus

- minus

* multiply

/ divide

MOD division remainder

^ raise to the power

EXAMPLE QBASIC CODE:-

num1=4

num2=2

PRINT num1 + num2

PRINT num1 - num2

PRINT num1 * num2

PRINT num1 / num2

PRINT num1 MOD num2

PRINT num1 ^ num2

...output...

6

2

8

2

0

16

-> COMPARISON OPERATORS

= equals

> greater than

< lesser than

>= greater than/or, equals

<= lesser than/or, equals

<> not

EXAMPLE QBASIC CODE:-

num1 = 6

num2 = 8

IF num1 = num2 THEN PRINT "Equal to"

IF num1 > num2 THEN PRINT "Greater than"

IF num1 < num2 THEN PRINT "Lesser than"

IF num1 >= num2 THEN PRINT "Greater than/or, equal to"

IF num1 <= num2 THEN PRINT "Lesser than/or, equal to"

IF num1 <> num2 THEN PRINT "NOT equal"

...output...

Lesser than

Lesser than/or, equal to

NOT equal

ReportLike(0ShareFavorite

Copyright © 2026 eLLeNow.com All Rights Reserved.