WAP to find whether a triangle is right angled triangle or not
CLS
INPUT “ENTER HYPOTENUSE, BASE AND PERPENDICULAR”; H, B, P
IF H ^ 2 = (B ^ 2 + P ^ 2) THEN
PRINT “IT IS A RIGHT ANGLED TRIANGLE”
ELSE
PRINT “IT IS NOT A RIGHT ANGLED TRIANGLE”
END IF
END
USING SUB
DECLARE SUB RIGHT(H,B,P)
CLS
INPUT “ENTER HYPOTENUSE, BASE AND PERPENDICULAR”; H, B, P
CALL RIGHT(H,B,P)
END
SUB RIGHT(H,B,P)
IF H ^ 2 = (B ^ 2 + P ^ 2) THEN
PRINT “IT IS A RIGHT ANGLED TRIANGLE”
ELSE
PRINT “IT IS NOT A RIGHT ANGLED TRIANGLE”
END IF
END SUB
0 Comments