I am trying to create an array to get the commission of sales made by 15 people. Here is my start but I am getting crazy errors. What am I doing wrong?
import java.util.Scanner;
public class Commission
{
public static void main( String args[])
{
int pay;
int total;
int salesp[]={1,2,3,4,5,6,7,8,9,10,11,12,13,14,15};
int salespw[]={500,1000,350,625,5000,200,280,230,290,376,610,
2000,350,100,150};
{
for(int counter= 0; counter < array.length; counter++)
System.out.println(%5d%8d\n'Sales Person'%5d%8d\n'Sales Per Week',
counter,array[counter]);
pay = (.09 * salespw) + 200;
System.out.printf( "Your earnings for this week: $%.2f\n\n", pay);
}
}
}
|