Answered step by step
Verified Expert Solution
Question
1 Approved Answer
C++ Please 4.15 LAB*: Program: Price for hosting 3 pizza parties Program Specifications. Write a program to calculate the cost of hosting three pitza parties
C++ Please
4.15 LAB*: Program: Price for hosting 3 pizza parties Program Specifications. Write a program to calculate the cost of hosting three pitza parties on Friday, Saturday and Sunday. Reac from incut the number of pecple attending, the average number of slices per person and the cost of one cizza. Dollar values are output with two decimals. The template includes a statement that causes output of neating-point numbers in the program to be printed with two digits after the decimal point cout fixed \& setprecision(2); Note: this program is designed for incrementel development. Camplete each step and submit for qrading before starting the next step. Only a portion of tesis pass after each step cut conifm progress. Step 1 (2 pts), Read from ripul she number of peopke (int), averape slices per persun (double) and cust or one picca (dcuble). Calculate the number of whoe pizzas needed (8 slices per pizza). There will likely be laftowers for treakfast. Hint Use the ceil() function found in the grading to confirm 1 test passes. Ex: If the incul is: 102.610.50 The output is: Briday night. Party 4 pizzas: $42,00 Step 2 ( 2 pts). Calculate and output the sales tax (7% ). Calcu late ard output the delisery charge (20\% of cost including tax). Submit for grading to confirm 2 tests pass. Ex: If the input is: 102.610.50 The oustput is: Exiday Might Farty 1 Tizzaz: 3.2.00 Tax: 52.94 Delivary: 58.55 Step 4 ( 2 pts), Repeat steps 1 - 3 with additional incuts for Saturday right (one order per lire). Maintain and output a separate total for both parties. Submit for grading to confirm 5 tests pass. Ex: If the inout is: y142.53.210.3514.55 Step 5 (2 pts), Repeat steps 13 with additional irputs for Sunday night (are order per Ine). Maintain and output a total for all partics Submit tor grading to contim all tests pass. Ex: If the inout is: 622122.82.11.810.9512.9514.95 The output isStep 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