Create a program plan, an algorithm, and draw a flowchart that uses sequence structure, that would accept a radius of a circle and computes its area, circumference and diameter. Use constant declaration.
area = pi * radius2
circumference = 2 * pi * radius
diameter = 2* radius
Program Plan
1. Declare variables
2. Read input data
3. Create sequence structure
4. Display result
Algorithm:
Start
Declare variables radius, area, circumference, diameter
Declare constant pi= 3.14159265359
Read radius
Set area = pi * radius * radius
Set circumference = 2 * pi * radius
Set diameter = 2 * radius
Display area
Display circumference
Display diameter
Stop
Flowchart
Comments
Leave a comment