Write a qbasic program to calculate the volume of cubical tank
Answers
Answered by
0
Explanation:
REM PROGRAM TO DISPLAY TOTAL SURFACE AREA AND VOLUME OF CYLINDER. CLS. DECLARE SUB TSAREA (R, H) DECLARE SUB VOLUME(R, H) SUB TSAREA (R, H) A= 2 * 3.14 * R * (R + H) SUB VOLUME (R, H) V = 3.14 * R ^ 2 * H. DECLARE FUNCTION TSAREA (R, H) FUNCTION TSAREA (R, H) FUNCTION VOLUME (R, H)
Answered by
1
Answer:
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.
Explanation:
Similar questions