Search:

Type: Posts; User: javapenguin

Search: Search took 0.09 seconds.

  1. Replies
    6
    Views
    1,242

    [SOLVED] Re: can't figure out..

    public static void selection_sort(double []a, String[] str)
    {
    int i,j;
    double max;
    int max_index;

    for (i=a.length-1;i>0;i--)
    {
    max = a[0];
    max_index = 0;
  2. Replies
    6
    Views
    1,242

    [SOLVED] Re: can't figure out..

    I can think of a way, to find the largest donation.

    double largestAmountDonated = 0;
    for (int j = 0; j < amountDonated; j++)
    {
    if (amountDonated[j] > largestAmountDonated)
    {...
  3. Replies
    6
    Views
    1,242

    [SOLVED] Re: can't figure out..

    Well, have two arrays, if you can.

    One stores Strings, the company names.
    The other stores values, the amount donated.

    String[] companies = new String[5];
    double[] amountDonated = new...
Results 1 to 3 of 3