#include <iostream.h>

//calcola massimo e valore medio di una matrice bidimensionale di interi
void main()
{
  const int RIGHE = 3;
  const int COLONNE = 4;
  int mat[RIGHE][COLONNE];
  
  for (int i = 0; i < RIGHE; i++)
    for (int j = 0; j < COLONNE; j++)
      cin >> mat[i][j];

  int max = mat[0][0];
  for (int i = 0; i < RIGHE; i++)
    for (int j = 0; j < COLONNE; j++)
      if (max < mat[i][j]) max = mat[i][j];
  cout << "Max: " << max << endl;

  int somma = 0;
  for (int i = 0; i < RIGHE; i++)
    for (int j = 0; j < COLONNE; j++)
    somma = somma + mat[i][j];
  cout << "Media approssimata: " << somma/(RIGHE*COLONNE) << endl;
                               //converte somma in un double
  cout << "Media precisa: " << double(somma)/(RIGHE*COLONNE) << endl;
}
