Question: Question #12. Using a case/switch construct, write a script to calculate the price of an order of candy bars. Prompt the user to enter the

 Question #12. Using a case/switch construct, write a script to calculate

Question #12. Using a case/switch construct, write a script to calculate the price of an order of candy bars. Prompt the user to enter the number of candy bars to purchase. Calculate the total price according to these constraints. o The total price of a single candy bar is: $20.00 o The total price of 2 candy bars is: $35.00 o The total price of 3 candy bars is: $47.00 o The total price of a number of candy bars greater than 3 is: $47.00 + 10 * (the number of bars - 3) The maximum number of candy bars allowed per order is 10. Note, these are top quality candy bars

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!