Help

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

  1. darine

    darine

    Joined:
    Jun 30, 2006
    Messages:
    2
    Ok I think I figured it out but I am unable to get my calculation: here is the code


    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);
    }
    }

    }

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

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. jacqueline

    help help help

    jacqueline, Jun 29, 2003, in forum: Computer Support
    Replies:
    16
    Views:
    937
    Slumpy
    Jun 30, 2003
  2. Cam

    HELP HELP HELP

    Cam, Aug 7, 2003, in forum: Computer Support
    Replies:
    3
    Views:
    455
    Brian H¹©
    Aug 7, 2003
  3. Tony Bowring
    Replies:
    8
    Views:
    607
    Patrick
    Nov 10, 2003
  4. Tony Bowring
    Replies:
    0
    Views:
    452
    Tony Bowring
    Nov 10, 2003
  5. The Martian

    Help Help Help Pentax S5i Help needed (Please)

    The Martian, Jun 4, 2008, in forum: Digital Photography
    Replies:
    14
    Views:
    1,567
    ASAAR
    Jun 20, 2008
Loading...

Share This Page