QBasic information clz 7
Attachments:
Answers
Answered by
0
Answer:
. To calculate area of a rectangle.
REM PROGRAM TO DISPLAY AREA OF RECTANGLE
CLS
INPUT “ENTER LENGTH”; L
INPUT “ENTER BREADTH”; B
A = L * B
PRINT “AREA OF RECTANGLE”; A
END
b. To calculate perimeter of a rectangle.
REM PROGRAM TO DISPLAY PERIMETER OF A RECTANGLE
CLS
INPUT “ENTER LENGTH”; L
INPUT “ENTER BREADTH”; B
P=2(l+b)
PRINT “AREA OF RECTANGLE ”; P
END
c. To calculate area of a circle.
REM PROGRAM TO DISPLAY AREA OF CIRCLE
CLS
INPUT “ENTER RADIUS”; R
A = 3.14 * R ^ 2
PRINT “AREA OF CIRCLE ”; A
END
d. To calculate perimeter of a circle.
CLS
REM PROGRAM TO DISPLAY PERIMETER OF A CIRCLE
INPUT" ENTER THE RADIUS " ;R
LET PERIMETER =22/7*R*2
PRINT " THE AREA OF CIRCLE =" ;PERIMETER
END
Similar questions