#include #include #include #include main(){ ifstream file; double **mat; int i,j,n; int nmisure=5; string nome_del_file; cout <<"Inserisci il nome del file: "; cin >> nome_del_file; file.open(nome_del_file.c_str()); if (file){ // Alloco una matrice (righe = giorni) // Elementi della riga <-> misure di un giorno file >> n; mat = new double*[n]; for (i=0;i> mat[i][j]; } } file.close(); int iday; cout << "Inserisci il giorno (da 1 a "<> iday; if (iday<=n && iday>=1){ iday--; double med=0; for (i=0;i=max) max = mat[i][j]; if (mat[i][j]<=min) min = mat[i][j]; } scarto = max-min; if (scarto>=smax) { smax = scarto; iday = i; xmax = max; xmin = min; } } cout << "Scarto max " << smax << " gradi nel giorno " << iday+1 << endl; cout << "Con T_min = " << xmin << " e T_max = " << xmax << endl; for(i=0;i