QBASIC PROGRAM TO FIND AREA OF A TRIANGLE
CLS
INPUT “ENTER BREADTH”; B
INPUT “ENTER HEIGHT”; H
A = 1 / 2 * (B * H)
PRINT “AREA OF TRIANGLE “; A
END
USING SUB
DECLARE SUB AREA(B,H)
CLS
INPUT “ENTER BREADTH”; B
INPUT “ENTER HEIGHT”;
CALL AREA(B,H)
END
SUB AREA(B,H)
A = 1 / 2 * (B * H)
PRINT “AREA OF TRIANGLE “; A
END SUB
0 Comments