CLS
INPUT "Enter Length : "; l
INPUT "Enter Breadth : "; b
area=l*b
PRINT "Area = "; area
END
INPUT "Enter Length : "; l
INPUT "Enter Breadth : "; b
area=l*b
PRINT "Area = "; area
END
Using SUB Procedure
DECLARE SUB areaRectangle(l,b)
CLS
INPUT "ENTER A LENGTH ";l
INPUT "ENTER A BREADTH";b
CALL areaRectangle(l,b)
END
SUB areaRectangle(l,b)
area=l*b
PRINT "AREA IS ";area
END SUB
CLS
INPUT "ENTER A LENGTH ";l
INPUT "ENTER A BREADTH";b
CALL areaRectangle(l,b)
END
SUB areaRectangle(l,b)
area=l*b
PRINT "AREA IS ";area
END SUB
Using FUNCTION Procedure
DECLARE FUNCTION areaRectangle(l,b)
CLS
INPUT "ENTER A LENGTH ";l
INPUT "ENTER A BREADTH";b
a = areaRectangle(l,b)
PRINT "Area = "; a
END
FUNCTION areaRectangle(l,b)
area=l*b
areaRectangle = area
END FUNCTION
CLS
INPUT "ENTER A LENGTH ";l
INPUT "ENTER A BREADTH";b
a = areaRectangle(l,b)
PRINT "Area = "; a
END
FUNCTION areaRectangle(l,b)
area=l*b
areaRectangle = area
END FUNCTION
No comments:
Post a Comment
If you have any doubts, Please let me know.