I have made a calculation program, but having a problem with the loop at the end. The rest of the program works, just then end part is needing some attention. I am trying to get it to increase in 5,000.00 increments to 50% of the total. If inputed value is 1,000.00 i want it to print out in 5,000.00 increments to 1,500.00. The program just outputs the initial value and then stops when it comes to the loop. Any direction would be greatly appreciated. Been banging my head on this for the past 4 days.
//This program calculates annual sales
import java.util.Scanner; // Program assigned to use Scanner for input
public class AnnualSales
{
//Main method begins execution of Java application
public static void main(String[] args)
{
//create scanner to obtain input from the command window
Scanner input=new Scanner(System.in);
double annualSales; //Annual sales made during the year
double annualTotal = 0; //The total annual compensation
double salary; //Annual Salary of sales representative
double commRate; //Commission rate
double salesTarget;
double potSales; //Potential sales
double counter;
salary = 60000; //set rate of 60,000.00 per sales rep
commRate=.10; //set commission rate of 10 percent
salesTarget=100000;
System.out.println("The current sales target is $100,000.00");
System.out.print("Enter the amount of sales:$"); //input query of sales
annualSales = input.nextInt(); //input value stored
if (annualSales >= 80000)
{
if (annualSales < 100000)
{
annualTotal = annualSales * commRate + salary;
System.out.println("You earned 10% sales incentive!");
System.out.println("Total compensation is :$" + annualTotal);
}
else
{
annualTotal = annualSales * (commRate * 2.5) + salary;
System.out.println("You earned a 10% sales incentive!");
System.out.println("You also earned the extra incentive!");
System.out.println("Total compensation is :$" + annualTotal);
}
}
else
{
//output of claculation
System.out.println("No sales incentive was earned.");
System.out.println("The total compensation is:$" + salary);
}
potSales = annualSales * .50 + annualSales;
System.out.println("This is your potential sales in 5k increments.");
System.out.println("Total Sales Total Compensation");
System.out.println("----------------------------------");
for (counter = annualSales; counter <= potSales; counter++);
// the loop and then print the commission with the projected sales.
System.out.println(counter + "\t\t" + counter );
} //end main method
} //end class AnnualSales