(a) State two BASIC programming keywords. (b) Write the following equations in BASIC format: (i)...

COMPUTER
WAEC 2016

(a) State two BASIC programming keywords.

(b) Write the following equations in BASIC format:

(i) I = PRT/100: (ii) Y= AX\(_2\) +BX+C; (iii) Y= MX + C

(c) Write a BASIC program that accepts mass and volume of a liquid as input from the User.

The program should compute.and display the density of the liquid. Density = mass volume

Explanation

(a) BASIC programming keywords: REM, LET, END, CLS, INPUT, IF, NEXT, DATS, GOSUB, RETURN, DIM, STOP, GOTO, READ etc.

(b)(i) I = P*R*T/100

(ii) Y =A"X ^2 +B X+C OR Y = A*X * X + B* X + C (ii) Y = M * X +C

(c) A Sample BASIC Program

10 CLS 20 REM BASIC program to calculate density of a liquid 30 INPUT

"Enter the mass of a liquid. MASS 40 REM Computation of values begins

50 LET DENSITY = MASS/VOLUME

60 PRINT "The density of a liquid":

DENSITY 70 END/STOP

10 CLS

20 REM BASIC program to calculate density of a liquid

30 INPUT "MASS"; M

40 INPUT "VOLUME"; V

50 LET DENSITY = M/V50

60 PRINT"DENSITY =" DENSITY

70 END



Post an Explanation Or Report an Error
If you see any wrong question or answer, please leave a comment below and we'll take a look. If you doubt why the selected answer is correct or need additional more details? Please drop a comment or Contact us directly. Your email address will not be published. Required fields are marked *
Add Math
Don't want to keep filling in name and email whenever you make a contribution? Register or login to make contributing easier.