Program to find area of triangle using FUNCTION
DECLARE FUNCTION AREA(A,B,C)
CLS
INPUT"ENTER FIRST SIDE";A
INPUT"ENTER SECOND SIDE";B
INPUT"ENTER THIRD SIDE";C
AR= AREA(A,B,C)
PRINT"Area of triangle="AR
END
FUNCTION AREA(A,B,C)
AREA=(S*(S-A)*(S-B)*(S-C))^(1/2)
END FUNCITON
CLS
INPUT"ENTER FIRST SIDE";A
INPUT"ENTER SECOND SIDE";B
INPUT"ENTER THIRD SIDE";C
AR= AREA(A,B,C)
PRINT"Area of triangle="AR
END
FUNCTION AREA(A,B,C)
AREA=(S*(S-A)*(S-B)*(S-C))^(1/2)
END FUNCITON
Comments
Post a Comment