15.
Write a program using
FUNCTION……END FUNCTION to find the perimeter of rectangle. [P=2(L+B)]
DECLARE
FUNCTION PER (L, B)
CLS
INPUT “ENTER
LENGTH”; L
INPUT “ENTER
BREADTH”; B
PRINT
“PERIMETER OF RECTANGLE”; PER (L, B)
END
FUNCTION PER
(L, B)
PER = 2 * (L +
B)
END FUNCTION
No comments:
Post a Comment