#include
int main()
{
int n,i;
double sum = 0.0; ///一开始sum要初始化为0.
int a[10];
scanf("%d",&n);
sum=0;
for(i=0;i
scanf("%d",&a[i]);
sum=(sum+a[i])*1.0/n; //////////这里计算错误了 应该是 sum = sum+1.0*a[i]/n;
}
printf("%.2f\n",sum);
return 0;
}
#include
#define maxnum 100
int main()
{
int a[maxnum],n;
double sum=0.0;
scanf("%d",&n);
for(int i=0; i
scanf("%d",&a[i]);
sum+=a[i];
}
printf("%.2f\n",sum*1.0/n);
return 0;
}
#include
int main()
{
int n,i;
double sum;
int a[10];
scanf("%d",&n);
sum=0;
for(i=0;i
scanf("%d",&a[i]);
sum=sum+a[i];
}
sum=sum*1.0/n;
printf("%.2f\n",sum);
return 0;
}
#include
int main()
{
int n,i;
double sum;
int a[10];
scanf("%d",&n);
sum=0;
for(i=0;i
scanf("%d",&a[i]);
sum=sum+a[i];
}
sum = sum / n; // 为什么要在里面算呢
printf("%.2f\n",sum);
return 0;
}