QBasic Programming

Display volume of hemisphere

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

USING SUB PROCEDURE

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

USING FUNCTION PROCEDURE

DECLARE FUNCTION VOLUME (R)
CLS
INPUT “ENTER RADIUS”; R
PRINT “VOLUME OF HEMISPHERE ”; VOLUME(R)
END

FUNCTION VOLUME (R)
VOLUME = (2 / 3) * 3.14 * R ^ 3
END FUNCTION

Display total surface area of hemisphere (Prev Lesson)
(Next Lesson) Display total surface area and volume of hemisphere
Back to QBasic Programming
Notice: compact(): Undefined variable: limits in /home/bhimgautam34/public_html/wp-includes/class-wp-comment-query.php on line 853

Notice: compact(): Undefined variable: groupby in /home/bhimgautam34/public_html/wp-includes/class-wp-comment-query.php on line 853

No Comments

Post a Reply

Course Curriculum

error: Content is protected !!