In quantity discounts, it's pretty common to have the quantity discount
vary with the number of items purchased, but not as a fixed percent per
item. Example:Quantity Purchased Discounted price (each)1 $102-4 $95-8
$78-10 $610+ $5For narrow price bands or not too many elements, using a
switch statement works OK:if (Quantity < 10){ switch(Quantity) case "1";
Price = 10; break; case "2"; Price = 9; break; case "3"; Price = 9;
break; case "4"; Price = 9; break; case "5"; Price = 7; break;etc.This
s...