Help

Discussion in 'The Lounge' started by darine, Jul 2, 2006.

  1. darine

    darine

    Joined:
    Jun 30, 2006
    Messages:
    2
    Likes Received:
    0
    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);
    }






    }
    }
     
    darine, Jul 2, 2006
    #1
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.