QBasic Programming

Display total surface area of hemisphere

REM PROGRAM TO DISPLAY TOTAL SURFACE AREA OF HEMISPHERE.
CLS
INPUT “ENTER RADIUS ”; R
A= 3 * 3.14 * R ^ 2
PRINT “TOTAL SURFACE AREA OF HEMISPHERE “; A
END

USING SUB PROCEDURE

DECLARE SUB TSAREA (R)
CLS
INPUT “ENTER RADIUS”; R
CALL TSAREA(R)
END

SUB TSAREA (R)
A= 3 * 3.14 * R ^ 2
PRINT “TOTAL SURFACE AREA OF HEMISPHERE “; A
END SUB

USING FUNCTION PROCEDURE

DECLARE FUNCTION TSAREA (R)
CLS
INPUT “ENTER RADIUS”; R
PRINT “TOTAL SURFACE AREA OF HEMISPHERE ”; TSAREA(R)
END

FUNCTION TSAREA (R)
TSAREA = 3 * 3.14 * R ^ 2
END FUNCTION

Display total surface area and volume of sphere (Prev Lesson)
(Next Lesson) Display 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 !!