#include<stdio.h>
int main()
{
int i,n;
double min,max,ave,sum=0;
scanf("%d",&n);
double a[n];
for(i=0;i<n;i++){
scanf("%lf",&a[i]);
sum+=a[i];
}
ave=1.0*sum/n;
min=a[0];
max=a[0];
for(i=0;i<n;i++){
if(max<a[i]){
max=a[i];
}
if(min>a[i]){
min=a[i];
}
}
printf("average = %.2lf\n",ave);
printf("max = %.2lf\n",max);
printf("min = %.2lf",min);
return 0;
}
#include<stdio.h>
#include<stdlib.h>
int main(void)
{
int N;
scanf("%d",&N);
int c;
int* a=(int*)malloc((N)*sizeof(int));
for(c = 0; c < N; c++)
{
scanf("%d",a+c);
}
double average=a[0],max=a[0],min=a[0];
for(c = 1; c < N; c++)
{
average+=a[c];
if(a[c]>max)
{
max=a[c];
}
if(a[c]<min)
{
min=a[c];
}
}
printf("average = %.2lf\n",average/N*1.0);
printf("max = %.2lf\n",max);
printf("min = %.2lf",min);
free(a);
return 0;
}