Computer Science, asked by giritarahr, 6 hours ago

QBASIC PROGRAM TO FIND AREA AND PERIMETER OF CIRCLE
WHOLE STEP BY STEP PLEASE

Answers

Answered by anindyaadhikari13
5

\textsf{\large{\underline{Solution}:}}

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

\textsf{\large{\underline{Explanation}:}}

  1. Line 1: Clears the screen.
  2. Line 2: Accepts the radius from the user.
  3. Line 3: Calculate perimeter using formula P = 2πr.
  4. Line 4: Calculate area using formula A = πr²
  5. Line 5-6: Displays the perimeter and area of the circle.
  6. Line 7: End of program.

See the attachment for output.

Attachments:

anindyaadhikari13: Thanks for the brainliest:)
Similar questions