Answered step by step
Verified Expert Solution
Question
1 Approved Answer
i need help with this c++ problem 3. Pizza for Dinner Joe's Pizza Palace needs a program to calculate the number of slices a pizza
i need help with this c++ problem
3. Pizza for Dinner 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: A) Each slice should have an area of 14.125 inches. B) To calculate the number of slices, simply divide the area of the pizza by 14.125. C) The area of the pizza is calculated with the formula: A=r2 Note: is the Greek letter pi. 3.14159 can be used as its value. The variable r is the radius of the pizza. Divide the diameter by 2 to get the radius. 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
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started