QBASIC PROGRAM TO FIND AREA OF A TRIANGLE

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

Post a Comment

0 Comments