Question: Now Write Some Code The code as it is now gives a 1 0 % discount for six packs. Your task is to modify it

Now Write Some Code
The code as it is now gives a 10% discount for six packs. Your task is to modify it so that it gives a 15%
discount for a case of 24 bottles. It should maximize the savings by giving the maximum number of full
cases, then the maximum number of six packs from the number of bottles that didnt make it into cases, then
the number of left over bottles.
Heres some test data to check against:
Request Cases 6-packs Singles Total Cost
4313148.504
4820052.632
3111134.572
If you have trouble getting the calculations to work, use the debugger to look at intermediate calculations to
see where you are going wrong.
Answer the questions for this part of the project in Gradescope.
Fix up the output
We really want to tell the person satisfying this order how many things to gather. Modify the printf statement
(and make no other changes!) so that your output looks like this:
C a s e s : 1, S i x p a c k s : 3, S i n g l e s : 1. The t o t a l c o s t i s $48.50
Your output must match that format EXACTLY. Notice that the printf statement is rounding the cost to the
nearest penny and has added a dollar sign to the total cost

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!