loops and array help

Posted by dalton on Stack Overflow See other posts from Stack Overflow or by dalton
Published on 2010-04-02T02:55:12Z Indexed on 2010/04/02 3:03 UTC
Read the original article Hit count: 358

Filed under:
|
public void arrayCalculation(int[][]scores,float[]averages, int[]temp) 
{ 
    int total;
    for(int a=0; a<5; a++)
        {
            for (int b=0; b<5; b++)
                {
                  scores[a][b] =  temp[a+b*5];

                }
            }
            for(int a = 0; a <5; a++)
                {
                    total = total + scores[a];
                }
            scores[5][0] = total;

} 

i need to add up the values stored in the first row and store it in the 6th positon in the row

© Stack Overflow or respective owner

Related posts about java

Related posts about homework