Solving a problem for the computer
Problem - You want to
develope a program to calculate the area of a circle. You
want to reuse it to calculate the area of any size of circle.
Steps
- Understand the problem.
- A circle area is calculated using the formula:
area = PI * radius2
- PI is approximated by 3.14.
- The radius will be variable for each execution.
- Design a solution.
- Define our
containers.
- Get input.
- Calculate
the area.
- Output the
area value.
- Test the solution.