Question: 8. 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
8. 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% Write a program that asks the user to enter the number of packages purchased. The pro- gram should then display the amount of the discount (if any) and the total amount of the purchase after the discount. For instance, to calculate 20% of a value N, you can use the formula: (20 / 100.0) * N (or 0.2 * N). SAMPLE RUN #8: java SoftwareSales

What I have -
import java.util.Scanner;
public class SoftwareSales { public static void main( String[] args ) { Scanner in = new Scanner( System.in );
System.out.println( "Enter number of packages purchased: " ); int count = in.nextInt();
float discount = ( 0 / 100 );
if( count
float costBeforeDiscount = count * 99; float $amountOfDiscount = costBeforeDiscount * discount; float $finalCost = costBeforeDiscount - $amountOfDiscount;
System.out.println( "Your discount is:" + $amountOfDiscount ); System.out.println( "Your total is:" + $finalCost ); } }
Error message I'm getting -

Interactive Session Hide Invisibles Enter number .o packages p urchase d:50 Your discount is $1980.00 Your total is: $2970.00- Highlight: None Show Highlighted Only
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
