Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

3:28 PM chegg.com 00 Sprint Programming Exercises-pg 169 #7 Software sales - A s

ID: 3676003 • Letter: 3

Question

3:28 PM chegg.com 00 Sprint Programming Exercises-pg 169 #7 Software sales - A software company sells a package that retail for $99. Quantity discounts are given according to the following table Quantiny 10-19 20-49 50-99 100 or more Discount 20% 30% 40% 50% Design a program that asks the user to enter the number of packages purchased. The program should then display the amount of the discount (if any) and the total amount of the purchase after the discount. pls help me, my professor use Flowgorithm

Explanation / Answer

I have npt seen the programming language named here..
But as i understand from the problem statement i have written this
below pesduo code for find the discount price function..based on the
given ranges.


double discount(quantity, price)
{
   total = quantity * price;
   discount = 0;
   if (19 > quantity && quantity < 10)
       discount = total * 0.2;
   else if (49 > quantity && quantity <20)
       discount = total * 0.3;
   else if(99 > quantity && quantity < 50)
       discount = total * 0.4;
   else  
       discount = total * 0.5;
  
   return discount;
}

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote