70.5k views
0 votes
Design an algorithm to find and display the price of the pizza per square inch

1 Answer

3 votes

Answer:

The algorithm is as follows

  1. Start
  2. Read the price of unit Pizza, P
  3. Read the Radius of Pizza, R
  4. Area = 3.14 * R * R
  5. Price Per Area = P/Area
  6. Print Price Per Area
  7. Stop

Step-by-step explanation:

The algorithm is self explanatory.

However, take note of the following

  1. Price Per Square inch is calculated by dividing the price (P) of the pizza by its area
  2. A pizza has a circular surface, so the area will be calculated using Area = πR²
  3. So, the formula to calculate the required output is P/Area as shown in the algorithm above.
User Felita
by
7.5k points