QBASIC PROGRAM TO FIND TOTAL SURFACE AREA AND VOLUME OF CUBOID
CLS
INPUT “ENTER LENGTH OF CUBOID”; L
INPUT “ENTER BREADTH OF CUBOID”; B
INPUT “ENTER HEIGHT OF CUBOID”; H
A= 2 * (L * B + B * H + H * L)
V = L * B * H
PRINT “TOTAL SURFACE AREA OF CUBOID "; A
PRINT “VOLUME OF CUBOID ”; V
END
USING SUB
DECLARE SUB TSAV(L,B,H)
CLS
INPUT “ENTER LENGTH OF CUBOID”; L
INPUT “ENTER BREADTH OF CUBOID”; B
INPUT “ENTER HEIGHT OF CUBOID”; H
CALL TSAV(L,B,H)
END
SUB TSAV(L,B,H)
A= 2 * (L * B + B * H + H * L)
V = L * B * H
PRINT “TOTAL SURFACE AREA OF CUBOID "; A
PRINT “VOLUME OF CUBOID ”; V
END SUB
0 Comments