Question: Write the program in c One way to consider the value of a pizza is to determine how much the pizza costs per square inch.

Write the program in c

Write the program in c One way to consider the value of

One way to consider the value of a pizza is to determine how much the pizza costs per square inch. In order to find this cost, you need to determine the area of the pizza, which can be found by using the formula Area = mr2. As long as you know the price and diameter of the pizzas, you can find out which restaurant offers the best value. (a) Write the function float area(float diameter) that calculates and returns a area per square inch of a pizza. NB: radius = - - diameter (3 marks) 2 (b) The cost per square inch is determined by dividing the pizza's price by the number of square inches (that is, its area). Write a main () function that uses the area function to calculate the cost per square inch of pizza from 7 different restaurants and print the restaurant which offers the best value pizza and the restaurant which offers the worst value pizza. The price and diameter are stored in a two-dimensional array as shown below. (5 marks) Price (FCFA) 2317.09 5801.43 8275.32 7485.53 10743.40 Diameter (inch) 6.4 10.2 14.25 12.82 16.8

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!