Loading....

WAEC SSCE - Computer Studies - 2022 (Objective)

Question 1 Report

Use the QBASIC program below to answer question below

10 REM Program to calculate product of numbers

20 CLS

30 INPUT A

40 INPUT B

50 LET PRODUCT=A*B

60 PRINT PRODUCT

70 END

 

The number 10, 20,30, 40, 50, 60 and 70 as stated in the program indicate 

Answer Details
The numbers 10, 20, 30, 40, 50, 60, and 70 in the QBASIC program represent line numbers. In QBASIC, each line of code is identified by a line number. The line numbers are used to help navigate the program, jump to specific lines, and edit the code. In the example program, line 10 is a comment that describes the program, line 20 clears the screen, line 30 asks the user for input of the value of A, line 40 asks the user for input of the value of B, line 50 multiplies A and B and stores the result in the variable PRODUCT, line 60 prints the value of PRODUCT, and line 70 ends the program.