17.
Write a program in QBASIC
to find the area of four wall of a room using FUNCTION…..END FUNCTION.
DECLARE
FUNCTION AREA (L, B, H)
CLS
INPUT “ENTER LENGTH”;
L
INPUT “ENTER
BREADTH”; B
INPUT “ENTER
HEIGHT”; H
PRINT “AREA OF
FOUR WALLS”; AREA(L, B, H)
END
FUNCTION AREA
(L, B, H)
A = 2 * H * (L
+ B)
AREA = A
END FUNCTION
No comments:
Post a Comment