66.0k views
8 votes
How to find the volume of cube in computer in QBASIC program ​

User Kassandra
by
2.7k points

1 Answer

6 votes

Answer:

QBasic Programming

REM PROGRAM TO DISPLAY VOLUME OF CUBE. CLS. INPUT “ENTER LENGTH”; L. ...

USING SUB PROCEDURE.

DECLARE SUB VOLUME(L) CLS. INPUT “ENTER LENGTH”; L. ...

SUB VOLUME (L) V = L ^ 3. PRINT “VOLUME OF CUBE ”; V. ...

USING FUNCTION PROCEDURE.

DECLARE FUNCTION VOLUME (L) CLS. ...

FUNCTION VOLUME (L) VOLUME = L ^ 3.