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

A software company sells a package that retails for $99. Quantity discounts are

ID: 3653183 • Letter: A

Question

A software company sells a package that retails for $99. Quantity discounts are given according to the following table: Quantity Discount 10-19 20% 20-49 30% 50-99 40% 100 or more 50% If 10 <= QA Then AmtA = (QA * 99) - (QA * 99 * 0.2) Else If 20 <= QA <= 49 Then AmtA = (QA * 99) - (QA * 99 * 0.3) Else If 50 <= QA <= 99 Then AmtA = (QA * 99) - (QA * 99 * 0.4) Else If QA >= 100 Then AmtA = (QA * 99) - (QA * 99 * 0.5) Else AmtA = QA * 99 End If End If End If End If I did this for each package but its not turning out right.

Explanation / Answer

A software company sells a package that retails for $99. Quantity discounts are given according to the following table: Quantity Discount 10-19 20% 20-49 30% 50-99 40% 100 or more 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. double discount( int quantity, double priceEach ) { double discount = 0.0; if (quantity >= 10) discount = 0.2; if(quantity >= 20) discount = 0.3; if(quantity >= 50 discount = 0.4; if(quantity >= 100) discount = 0.5; return quantity * (1.0 - discount) * priceEach; }

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