QBASIC PROGRAM TO FIND AREA AND PERIMETER OF CIRCLE
WHOLE STEP BY STEP PLEASE
Answers
Answered by
5
The given problem is solved using language - QBASIC.
CLS
INPUT "Enter radius: "; R
P = 2 * 3.14 * R
A = 3.14 * R * R
PRINT "Perimeter ="; P
PRINT "Area ="; A
END
- Line 1: Clears the screen.
- Line 2: Accepts the radius from the user.
- Line 3: Calculate perimeter using formula P = 2πr.
- Line 4: Calculate area using formula A = πr²
- Line 5-6: Displays the perimeter and area of the circle.
- Line 7: End of program.
See the attachment for output.
Attachments:
anindyaadhikari13:
Thanks for the brainliest:)
Similar questions