Software Sales A software company sells a package that retails for $99. Quantity
ID: 640691 • Letter: S
Question
Software Sales
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%
Create an application that lets the user 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.
any solution for that? Please help me out :(
with visual studio 2012 C# statement
Explanation / Answer
01 import java.util.Scanner; 02 03 public class SoftwareSales 04 05 { 06 public static void main(String[] args) 07 { 08 Scanner input = new Scanner(System.in); 09 int quantity; 10 double retailPrice = 99; 11 double discountPerc, purchaseCost, totalDiscount, totalCost; 12 13 14 //Ask user for inputs 15 16 System.out.print ("Enter the quantity purchased: "); 17 quantity = input.nextInt(); 18 19 20 21 //if/else statements 22 23 if (quantity >= 10 && quantity = 20 && quantity = 50 && quantity = 100) 56 { 57 58 purchaseCost = quantity * 99; 59 totalDiscount = purchaseCost * 0.5; 60 totalCost = purchaseCost - totalDiscount; 61 62 System.out.println ("Discount is 50%"); 63 } 64 65 else if (quantity >0 && quantityRelated Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.