Area of triangle using function.

Area of triangle using function procedure.

DECLARE FUNCTION AREA (B,H)
CLS
INPUT"Enter base";B
INPUT"Enter height";H
PRINT"Area of triangle=";AREA (B,H)
END

FUNCTION AREA (B,H)
A=1/2*B*H
AREA=A
END FUNCTION

Comments