darine32 0 Newbie Poster

Sorry Here is the code. I got my result ok I can't seem to get the calculation:

public class Commission
{
public static void main(String args[])
{
int salesp[];
salesp= new int [15];
int salespw[]={500,1000,350,625,5000,200,280,230,290,376,610,2000,350,100,150};
double commision=.09;
double total;
{
 
System.out.printf( "%5s%8s\n", "Salesper", "Sales per Week" );
 
{
for(int counter=0;counter < salespw.length; counter++)
System.out.printf("%5d%8d\n", counter, salespw[ counter ]);
}
 
{
for ( int counter = 0; counter < salespw.length; counter++ ) 
total += salespw[ counter ]*commission; 
System.out.println("%5d%8d\n",'Your commission is: ',commission);
}
}
 
}
 
}
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.