Below is the QBASIC program to calculate the area of a rectangle.
' Program to find area of rectangle
CLS
INPUT "Enter the length: "; l
INPUT "Enter the breadth: "; b
area = l * b
PRINT "Area of the rectangle is: ";area
END
Explanation:
Let’s first see the formula: Area = length * breadth. So, we can determine the area of a rectangle by taking the length and breadth of the rectangle from the user and multiplying the length and breadth together.