In this tutorial, we will learn how to write and develop an algorithm and flowchart to find the area of a circle of radius r. The problem to solve is to find the area of the circle.
Mathematical formula for the area = pi*r*r
Let’s analyze the inputs and the expected outputs of the program.
Input: Radius r of the Circle.
Output: Area of the Circle
Step 1 : Start
Step 2 : Read the radius r of the circle
Step 3: Compute the Area as per the formula. PI*r*r
Step 4: Print the are of the circle
Step 5: Stop
DECLARE Real r
DECLARE Real area
OUTPUT “Enter the circle radius=”
ASSIGN area = PI*r*r
OUTPUT “Area of the circle with radius ” & r & ” = ” & area
Execute the flowchart and verify the output of the flowchart.