All pastes #2069590 Raw Edit

Untitled

public text v1 · immutable
#2069590 ·published 2011-05-26 19:25 UTC
rendered paste body
        int index;
        int highestPay;
        int bestDriver;
        highestPay = pay[0];
        bestDriver = 0;
        for (index = 0; index < pay.length; index++)
        {
            if (pay[index] > highestPay)
            {
                highestPay = pay[index];
                bestDriver = index;
            }
        }
        System.out.println("Best driver's pay is " +bestDriver+ " with pay of " +highestPay * PAY_RATE);