I am a first time user to Java and I am stuck and cant figure out what to do.. Please help. My code is
import java.util.Scanner;
public class rshomework2
{
public static void main ( String[] args)
{
Scanner input = new Scanner(System.in);
sales;
final double base = 800;
System.out.println("Enter sales total");
sales = input.nextDouble();
// Calculate the amount of commission.
commission = rate * sales;
if (sales < 2999.99)
rate = 0.02; // 2% commission rate
else if (sales < 4999.99)
rate = 0.03; // 3% commission rate
else if (sales < 8999.99)
rate = 0.04; // 4% commission rate
else if (sales < 10999.99)
rate = 0.05; // 5% commission rate
else
rate = 0.06; // 6% commission rate
// Calaulate the amount of Salary.
Salary = commission + base;
// output values
System.out.println ( "Gross Salary is $" + Salary);
}
}
when I try to compile it says error line 12 syntax error, insert assignmentOperator Expression to complete expression. Please help.