QBASIC TO DISPLAY VOLUME OF SPHERE
CLS
INPUT “ENTER RADIUS ”; R
V = (4 / 3) * 3.14 * R ^ 3
PRINT “VOLUME OF SPHERE ”; V
END
USING SUB
DECLARE SUB VOL(R)
CLS
INPUT “ENTER RADIUS ”; R
CALL SUB(R)
END
SUB VOL(R)
V = (4 / 3) * 3.14 * R ^ 3
PRINT “VOLUME OF SPHERE ”; V
END SUB
0 Comments