晕,是挨着顺序的每五个平均数吗?问题不要问的模糊哟!
#include<stdio.h>
void main()
{
int i;
float sum;
int a[15] = {2,2,3,4,1,3,4,6,7,5,4,2,4,2,5};
printf("输入信息\n");
for(i=0;i<10;i++) {
sum = (a[i] + a[i+1] + a[i+2] + a[i+3] + a[i+4])/5;
printf("第%d组5位平均数数是:%.1f\n",(i+1),sum);
}
}