Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

ICE04B.cpp Bronx Pizza needs a program to calculate the number of slices a pizza of any size can be divided into. They also need the

image text in transcribed
ICE04B.cpp Bronx Pizza needs a program to calculate the number of slices a pizza of any size can be divided into. They also need the program to recommend the number of pizzas needed to feed a given number of people at a gathering. The program should perform the following steps: Ask the user for the diameter of the pizzas) to be ordered, how many people will attend, and how many slices the average person will eat. Each slice should have a minimum area of 16.225 square inches. Display a message telling the number of slices per pizza, and how many pizzas are Use a named constant for pi (PI). All input and output is whole numbers only needed To calculate this correctly, you need to know more about rounding in C+ roundO will do an arithmetic round; round(2.4) is 2, and round(2.5) is 3. floor) rounds down: floor 2.9) is 2. ceil) rounds up: ceil(2.1) is 3 These functions use the cmath library. Sample run: What size pizzas (diameter inches)? 14 How many slices per person? 3 How many people are you trying to feed? 8 For your order of 14" pizzas to feed 8 people at 3 slices per person and 9 slices per pizza, we recommend getting 3 pizzas. You will have 3 slices left over. ICE04B.cpp Bronx Pizza needs a program to calculate the number of slices a pizza of any size can be divided into. They also need the program to recommend the number of pizzas needed to feed a given number of people at a gathering. The program should perform the following steps: Ask the user for the diameter of the pizzas) to be ordered, how many people will attend, and how many slices the average person will eat. Each slice should have a minimum area of 16.225 square inches. Display a message telling the number of slices per pizza, and how many pizzas are Use a named constant for pi (PI). All input and output is whole numbers only needed To calculate this correctly, you need to know more about rounding in C+ roundO will do an arithmetic round; round(2.4) is 2, and round(2.5) is 3. floor) rounds down: floor 2.9) is 2. ceil) rounds up: ceil(2.1) is 3 These functions use the cmath library. Sample run: What size pizzas (diameter inches)? 14 How many slices per person? 3 How many people are you trying to feed? 8 For your order of 14" pizzas to feed 8 people at 3 slices per person and 9 slices per pizza, we recommend getting 3 pizzas. You will have 3 slices left over

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Beginning Microsoft SQL Server 2012 Programming

Authors: Paul Atkinson, Robert Vieira

1st Edition

1118102282, 9781118102282

More Books

Students also viewed these Databases questions

Question

Know the three main dimensions of the service environment.

Answered: 1 week ago

Question

Understand the roles of signs, symbols, and artifacts.

Answered: 1 week ago