public static void main(Strings[] args)
the argument should be
String[] args not Strings[]
you don't have to put condition in
else keyword.
the program will read the statements in
else when the if and else if condition falls to false.
if (sales > 20000.01 )
commission = sales * .20;
else if (sales > 18000.01 && sales <= 20000)
commission = sales * .18;
else if (sales > 12000.01 && sales <= 18000)
commission = sales * .15;
else if (sales > 8000.01 && sales <= 12000)
commission = sales * .12;
else (sales <= 8000)
commission = sales * .10;
please don't put
carriage return every after conditional statement since you are not using braces,
and please, use braces every conditional statement.
{
System.out.println("Your Commission + sales total is :$" + mask.format((sales));}
why do you have to put the opening and closing braces for printing?
and you never declare an Object of
mask. what is
mask?
double sales; //inputted sales amount
double commission = 0; //commission pay amount
System.out.print("Please enter sales amount:");
double sales = input.nextDouble();
you declared
double sales twice.