QBasic Programming

Display total surface area of cylinder

REM PROGRAM TO DISPLAY TOTAL SURFACE AREA OF CYLINDER
CLS
INPUT “ENTER RADIUS ”; R
INPUT “ENTER HEIGHT”; H
A= 2 * 3.14 * R * (R + H)
PRINT “TOTAL SURFACE AREA OF CYLINDER “; A
END

USING SUB PROCEDURE

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

SUB TSAREA (R, H)
A= 2 * 3.14 * R * (R + H)
PRINT “TOTAL SURFACE AREA OF CYLINDER “; A
END SUB

USING FUNCTION PROCEDURE

DECLARE FUNCTION TSAREA (R, H)
CLS
INPUT “ENTER RADIUS”; R
INPUT “ENTER HEIGHT”; H
PRINT “TOTAL SURFACE AREA OF CYLINDER”; TSAREA(R, H)
END

FUNCTION TSAREA (R, H)
TSAREA = 2 * 3.14 * R * (R + H)
END FUNCTION

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