Answered step by step
Verified Expert Solution
Question
1 Approved Answer
I need this program written in C Program Specifications. Write a program to calculate the cost of hosting three pizza parties on Friday, Saturday and
I need this program written in C
Program Specifications. Write a program to calculate the cost of hosting three pizza parties on Friday, Saturday and Sunday. Read from input the number of people attending, the average number of slices per person and the cost of one pizza. Dollar values are output with two decimals. For example, printfCost: $f cost;
Note: this program is designed for incremental development. Complete each step and submit for grading before starting the next step. Only a portion of tests pass after each step but confirm progress.
Step pts Read from input the number of people int average slices per person double and cost of one pizza double Calculate the number of whole pizzas needed slices per pizza There will likely be leftovers for breakfast. Hint: Use the ceil function found in the math library to round up to the nearest whole number and convert to an integer. Calculate and output the cost for all pizzas. Submit for grading to confirm test passes.
Ex: If the input is:
The output is:
Friday Night Party
Pizzas: $
Step pts Calculate and output the sales tax Calculate and output the delivery charge of cost including tax Submit for grading to confirm tests pass.
Ex: If the input is:
The output is:
Friday Night Party
Pizzas: $
Tax: $
Delivery: $
Step pts Calculate and output the total including pizza, tax and delivery. Submit for grading to confirm tests pass.
Ex: If the input is:
The output is:
Friday Night Party
Pizzas: $
Tax: $
Delivery: $
Total: $
Step pts Repeat steps with additional inputs for Saturday night one order per line Maintain and output a separate total for both parties. Submit for grading to confirm tests pass.
Ex: If the input is:
The output is:
Friday Night Party
Pizzas: $
Tax: $
Delivery: $
Total: $
Saturday Night Party
Pizzas: $
Tax: $
Delivery: $
Total: $
Weekend Total: $
Step pts Repeat steps with additional inputs for Sunday night one order per line Maintain and output a total for all parties. Submit for grading to confirm all tests pass.
Ex: If the input is:
The output is:
Friday Night Party
Pizzas: $
Tax: $
Delivery: $
Total: $
Saturday Night Party
Pizzas: $
Tax: $
Delivery: $
Total: $
Sunday Night Party
Pizzas: $
Tax: $
Delivery: $
Total: $
Weekend Total: $
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