7.3 Solutions

     
    1. a
    2. a[0]
    3. a[2]
    4. a[0][0]
    5. a[1][2]
    6. a[2][3]
    1. 25 x 40 = 1000
    2. 3 x 6 x 50 = 900
    3. 60 x 40 = 2400
    4. 5 x 10 x 20 = 1000
    1.  
      427
      391
    2.  
      43
      29
      71
    3.  
      391
      427
  1.  
    for(i = a[0].length - 1; i >= 0; i--)
    {
       for(j = a.length - 1; j >=0; j--)
          print(a[j][i]);
       println();
    }
  2.  
    float sum (float[][] rectArray)
    {
       float result = 0;
       for (int i = 0; i < rectArray.length; i++)
          for (int j = 0; j < rectArray[0].length; j++)
             result += rectArray[i][j];
       return result;
    } 
  3.  
    int max (int[][] inputArray)
    {
       int max = inputArray[0][0];
       for (int i = 0; i < inputArray.length; i++)
          for (int j = 0; j < inputArray[i].length; j++)
             if (inputArray[i][j] > max)
                max = inputArray[i][j];
       return max;
    } 
  4.  
     void print (int[][] inputArray)
    {
       for (int i = 0; i < inputArray.length; i++)
       {
          for (int j = 0; j < inputArray[i].length; j++)
             print(inputArray[i][j] + " ");
          println();
       }
    } 
  5.  
    int size (int[][][] inputArray)
    {
       int count = 0;
       for (int i = 0; i < inputArray.length; i++)
          for (int j = 0; j < inputArray[i].length; j++)
             for (int k = 0; k < inputArray[i][j].length; k++)
                count++;
       return count;
    }