Question: A hardware store awards coupons depending on how much a customer spends. For example, if you spend $45, you will get a coupon worth 5%
A hardware store awards coupons depending on how much a customer spends. For example, if you spend $45, you will get a coupon worth 5% percent of that amount. The following table shows the percent used to calculate the coupon awarded for different amounts spent. Write a program that calculates and prints the value of the coupon a person can receive based on the items purchased, and the amount paid after the discount is applied. Money Spent Coupon Percent Less than $10 No coupon Between $10 and $50 5% Between $50 and $75 10% Between $75 and $125 15% Between $125 and $200 18% More than $200 20% Note, as specified, it is not clear how to handle boundary conditions. For example, what is the coupon percent for $125.25? Is the discount 15% or 18%? You should decide how you are going to handle boundary conditions and be sure to explain your choice in the program documentation.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
