===== С++ 17 =====
#include <iostream>
using namespace std;
int main()
{
int n = 7, min = 100, max = -100, s = 0;
int T[n];
for(int i = 0; i < n; i++)
cin >> T[i];
s += T[i];
if(T[i] > max)
max = T[i];
else if(T[i] < min)
min = T[i];
}
double avg = (double)s / n;
cout<< "min = " << min << ", max = " << max << ", среднее = " << avg;
return 0;
===== С++ 17 =====
#include <iostream>
using namespace std;
int main()
{
int n = 7, min = 100, max = -100, s = 0;
int T[n];
for(int i = 0; i < n; i++)
{
cin >> T[i];
s += T[i];
if(T[i] > max)
max = T[i];
else if(T[i] < min)
min = T[i];
}
double avg = (double)s / n;
cout<< "min = " << min << ", max = " << max << ", среднее = " << avg;
return 0;
}