0
已解决
吴卓励
初级守护
初级守护
#include<iostream>
#include<cstdio>
using namespace std;
int main()
{
int n,a,maxn=0,minn=50;
double sum=0,x;
cin>>n;
for(int i=1;i<=n;i++)
{
cin>>a;
sum+=a;
if(a>=maxn)
{
maxn=a;
}
if(a<=minn)
{
minn=a;
}
}
cout<<maxn<<" "<<minn<<endl;
printf("%.2f",sum/n);
return 0;
}