19.
Write a program using
FUNCTION…END FUNCTION to find area of the triangle.
DECLARE FUNCTION AREA (B, H)
CLS
INPUT “ENTER
BREADTH”; B
INPUT “ENTER
HEIGHT”; H
PRINT “AREA OF
TRIANGLE ”; AREA( B, H)
END
FUNCTION AREA
(B, H)
A = 1 / 2 * (B
* H)
AREA = A
END FUNCTION
No comments:
Post a Comment