Best writers. Best papers. Let professionals take care of your academic papers

Order a similar paper and get 15% discount on your first order with us
Use the following coupon "FIRST15"
ORDER NOW

I am working on a Java project, and I cannot get the code to print out the answers to the calculations

I am working on a Java project, and I cannot get the code to print out the answers to the calculations.  Could

someone help me please?

import java.util.Scanner;public class SoftwareSales{public static void main(String[] args){Scanner input = new Scanner(System.in);int quantity = 0;double retailPrice = 99;double discountPerc = 0.0, purchaseCost = 0.0, totalDiscount = 0.0, totalCost =0.0;//Ask user for inputsSystem.out.print (“Enter the number of packages purchased: “);quantity = input.nextInt();//if/else statementsif (quantity >= 10 && quantity <= 19){discountPerc = 0.8;}else if (quantity >= 20 && quantity <=49){discountPerc = 0.7;}else if (quantity >= 50 && quantity <= 99){discountPerc = 0.6;}else if (quantity >= 100){discountPerc = 0.5;}else if (quantity >0 && quantity <= 9){discountPerc = 0.0;}else if (quantity <0){System.out.println (“You entered an invalid number”);purchaseCost = quantity * 99;totalDiscount = purchaseCost * discountPerc;totalCost = purchaseCost – totalDiscount;System.out.println (“Your discount is: $” + totalDiscount +“\n Your total is: $” + totalCost);}System.exit(0)}}
Background image of page 1

Step-

 
Looking for a Similar Assignment? Order now and Get 10% Discount! Use Coupon Code "Newclient"