QBASIC PROGRAM TO CALCULATE VOLUME OF HEMISPHERE

QBASIC PROGRAM TO CALCULATE VOLUME OF HEMISPHERE



 CLS
 INPUT “ENTER RADIUS ”; R
 V = (2 / 3) * 3.14 * R ^ 3
 PRINT “VOLUME OF HEMISPHERE ”; V
 END

USING SUB


DECLARE SUB VOLUME(R)
 CLS
 INPUT “ENTER RADIUS ”; R
 CALL VOLUME(R)
 END
 
 SUB VOLUME(R)
 V = (2 / 3) * 3.14 * R ^ 3
 PRINT “VOLUME OF HEMISPHERE ”; V
 END SUB

Post a Comment

0 Comments