- To find the area of rectangle (using FUNCTION procedure) (Qbasic Code)
- DECLARE SUB FUNCTION (l,b)
CLS
INPUT "Enter the lenght of rectangle"; l
INPUT "Enter the breadth of rectangle"; b
PRINT "The area of rectangle is"; area(l, b)
END
FUNCTION area (l, b)
a = l * b
area = a
END FUNCTION
Using SUB Procedure (View)