CLS
INPUT "Enter Breadth : "; b
INPUT "Enter Height : "; h
area = 2 * h * (l + b)
PRINT "Area of 4 walls = "; area
END
INPUT "Enter Breadth : "; b
INPUT "Enter Height : "; h
area = 2 * h * (l + b)
PRINT "Area of 4 walls = "; area
END
Using SUB Procedure
DECLARE SUB area(l,b,h)
CLS
INPUT "Enter Breadth : "; b
INPUT "Enter Height : "; h
CALL area(l, b, h)
END
SUB area (l, b, h)
a = 2 * h * (l + b)
PRINT "Area of 4 walls = "; a
END SUB
CLS
INPUT "Enter Breadth : "; b
INPUT "Enter Height : "; h
CALL area(l, b, h)
END
SUB area (l, b, h)
a = 2 * h * (l + b)
PRINT "Area of 4 walls = "; a
END SUB
Using FUNCTION Procedure
DECLARE FUNCTION area(l,b,h)
CLS
INPUT "Enter Breadth : "; b
INPUT "Enter Height : "; h
a = area(l, b, h)
PRINT "Area of 4 walls = "; a
END
FUNCTION area (l, b, h)
a = 2 * h * (l + b)
area = a
END FUNCTION
CLS
INPUT "Enter Breadth : "; b
INPUT "Enter Height : "; h
a = area(l, b, h)
PRINT "Area of 4 walls = "; a
END
FUNCTION area (l, b, h)
a = 2 * h * (l + b)
area = a
END FUNCTION
No comments:
Post a Comment
If you have any doubts, Please let me know.