Question: For this assignment, write a program that calculates a discount for buying certain quantities of coffee. Consider the following scenario: A coffee company sells a

 For this assignment, write a program that calculates a discount for

For this assignment, write a program that calculates a discount for buying certain quantities of coffee. Consider the following scenario: A coffee company sells a pound of coffee for $12.99. Quantity discounts are given according to the table below. Quantity Discount 5-9 5% 10-19 10% 20-29 15% 30 or more 20% Write a program that asks for the number of pounds purchased and computes the total cost of the purchase. Make sure the output formatting is appropriate for the values provided. Be sure to include comments throughout your code where appropriate. Input validation: Decide how the program should handle an input of less than 0

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!