#include #include using namespace std; int main() { const int temp[][3] { {45, 60, 52}, {48, 62, 55}, {50, 64, 58}, {47, 59, 53}, {49, 63, 56} }; const size_t nrows {size(temp)}; const size_t ncols {size(temp[0])}; int sum {0}; cout << "Temperatures for the week:\n"; for (size_t row {0}; row < nrows; ++row) { cout << "Day " << row << ": "; for (size_t col {0}; col < ncols; ++col) { cout << temp[row][col] << " "; sum += temp[row][col]; } cout << "\n"; } const double avg {(double)sum / (nrows * ncols)}; cout << "Average temperature: " << avg << "\n"; return EXIT_SUCCESS; }