Results 1 to 2 of 2
  1. #1
    Join Date
    Sep 2011
    Posts
    1
    Rep Power
    0

    Default Looping over averages in an int[][] array

    I need no add an average to ever member in this int[][] array without using about 256 lines of code to replace it. I am adveraging the height of a grid of squares like this:
    [a][b][c][d][e] with c being the average of a and e, and b being the average of a and c, and so on. It gets more complicated though:
    [a][b][c][d][e]
    [f] [g][h][i] [j]
    [k] [l][m][n][o]
    [p][q][r] [s] [t]
    [v][w][x][y][z] (don't yell that I missed "u"!)
    So h is the average of m and c, and i is the average of c, e, m and o. This has to be done for a 162 grid.

  2. #2
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Posts
    19,316
    Blog Entries
    1
    Rep Power
    26

    Default Re: Looping over averages in an int[][] array

    I think that I speak for all in wishing you much success in this assignment.

    If you get stuck, please show us your code and ask as specific a question as possible, and we'll do our best to help you.

Similar Threads

  1. Beginner Loops for averages
    By mobosecomin in forum New To Java
    Replies: 6
    Last Post: 10-17-2010, 09:17 PM
  2. Problem with Sums and Averages in Sales Report
    By DavidEvans in forum New To Java
    Replies: 9
    Last Post: 04-21-2010, 08:57 PM
  3. Looping Array Elements
    By enzyme in forum New To Java
    Replies: 3
    Last Post: 11-26-2009, 04:35 PM
  4. Averages of user inputed values (Need Help)
    By Zebra in forum New To Java
    Replies: 2
    Last Post: 04-16-2008, 01:51 PM
  5. Replies: 4
    Last Post: 04-16-2008, 01:26 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •