CLS

INPUT “ENTER HEIGHT, 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 PROCEDURE

DECLARE SUB CHECK (H, B, P)

CLS

INPUT “ENTER HEIGHT, BASE AND PERPENDICULAR”; H, B, P

CALL CHECK (H, B, P)

END

SUB CHECK (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

USING FFUNCTION PROCEDURE

DECLARE FUNCTION CHECK$ (H, B, P)

CLS

INPUT “ENTER HEIGHT, BASE AND PERPENDICULAR”; H, B, P

PRINT CHECK$ (H, B, P)

END

FUNCTION CHECK$ (H, B, P)

IF H ^ 2 = (B ^ 2 + P ^ 2) THEN

CHECK$ = “IT IS A RIGHT ANGLED TRIANGLE”

ELSE

CHECK$ = “IT IS NOT A RIGHT ANGLED TRIANGLE”

END IF

END FUNCTION

## No Comments