QBasic Programming

Display area of 4 walls

REM PROGRAM TO DISPLAY AREA OF 4 WALLS
CLS
INPUT “ENTER LENGTH”; L
INPUT “ENTER BREADTH”; B
INPUT “ENTER HEIGHT”; H
A = 2 * H * (L + B)
PRINT “AREA OF FOUR WALLS“; A
END

USING SUB PROCEDURE

DECLARE SUB AREA (L, B, H)
CLS
INPUT “ENTER LENGTH”; L
INPUT “ENTER BREADTH”; B
INPUT “ENTER HEIGHT”; H
CALL AREA (L, B, H)
END

SUB AREA (L, B, H)
A = 2 * H * (L + B)
PRINT “AREA OF FOUR WALLS”; A
END SUB

USING FUNCTION PROCEDURE

DECLARE FUNCTION AREA (L, B, H)
CLS
INPUT “ENTER LENGTH”; L
INPUT “ENTER BREADTH”; B
INPUT “ENTER HEIGHT”; H
AR = AREA(L, B, H)
PRINT “AREA OF FOUR WALLS”; AR
END

FUNCTION AREA (L, B, H)
A = 2 * H * (L + B)
AREA = A
END FUNCTION

Display area and circumference of circle (Prev Lesson)
(Next Lesson) Display area of triangle
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 !!