public class Temperature {
  
  public static void main(String[] args) {
  
    
    int[][] temperatures = {{35, 35, 45, 49, 53, 53, 55},
                            {50, 52, 68, 75, 78, 76, 75}};
			    

    //Ouput low temperature for Sunday
    
    System.out.println(temperatures[0][0]);
    
    //Output high temperature for Thursday
    
    System.out.println(temperatures[1][4]);
    
    //Output low temperature for Tuesday
    
    System.out.println(temperatures[0][2]);
  
    
    //Calculate the average low temperature
    
    int sum = 0;
    for (int j = 0; j < temperatures[0].length; j++)
      sum += temperatures[0][j];
    int lowAverage = sum/temperatures[0].length;
    System.out.println("Average Low Temperature: " + 
                       lowAverage);
		       
    
    //Calculate the average temperature overall
    
    sum = 0;
    for (int i = 0; i < temperatures.length; i++)
      for (int j = 0; j < temperatures[i].length; j++)
         sum += temperatures[i][j];
    int overallAverage = sum/ 
           (temperatures.length * temperatures[0].length);
    
    //Determine the temperature range
    
    int min = temperatures[0][0];
    int max = temperatures[0][0];
    for (int i = 0; i < temperatures.length; i++)
      for (int j = 0; j < temperatures[i].length; j++) {
        if (temperatures[i][j] < min)
	  min = temperatures[i][j];
	if (temperatures[i][j] > max)
	  max = temperatures[i][j];
      }
    
    System.out.println("Temperature Range: " + min + " - " + 
                        max);
    
  }
}