Problem

Pizza PiJoe’s Pizza Palace needs a program to calculate the number of slices a pizza of an...

Pizza Pi

Joe’s Pizza Palace needs a program to calculate the number of slices a pizza of any size can be divided into. The program should perform the following steps:

A) Ask the user for the diameter of the pizza in inches.

B) Calculate the number of slices that may be taken from a pizza of that size.

C) Display a message telling the number of slices.

To calculate the number of slices that may be taken from the pizza, you must know

the following facts:

• Each slice should have an area of 14.125 inches.

• To calculate the number of slices, simply divide the area of the pizza by 14.125.

• The area of the pizza is calculated with this formula:

Area = π r2

Make sure the output of the program displays the number of slices in fixed point notation, rounded to one decimal place of precision. Use a named constant for pi.

Step-by-Step Solution

Request Professional Solution

Request Solution!

We need at least 10 more requests to produce the solution.

0 / 10 have requested this problem solution

The more requests, the faster the answer.

Request! (Login Required)


All students who have requested the solution will be notified once they are available.
Add your Solution
Textbook Solutions and Answers Search
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT