题目描述
blablabla
样例
#include<iostream>
#include<cstdio>
using namespace std;
const int N = 1e4 + 10;
int main()
{
int n,a[N];
double sum = 0;
cin >> n;
for(int i = 0; i < n; i ++ )
{
cin >> a[i];
}
int max = a[0], min = a[0];
for(int i = 0; i < n; i ++ )
{
if(max<a[i])
max = a[i];
}
for(int i = 0; i < n; i ++ )
{
if(min>a[i])
min = a[i];
}
cout<<max<<endl<<min<<endl;
for(int i = 0; i < n; i ++ )
{
sum+=a[i];
}
double ave = sum/n;
printf("%.2lf",ave);
return 0;
}