#include<stdio.h>
void search(float(*p)[4],int n);
void average(float *p,int n)
{
int i=0;
float sum=0.0,aver=0.0;
for(i=0; i<n; i++)
sum+=p[i];
sum+=*(p+i);
aver=sum/n;
float *p₋end;
p₋end=p+n-1;
for(; p<=p₋end; p++)
sum+=*p;
aver=sum/n;
for(; p<)
printf("sum=%5.2f,aver=%5.2f\n",sum,aver);
}
void search(float(*p)[4],int n)
{
int i=0;
for(i=0; i<4; i++)
printf("%6.1f\n",p[n][i]);
printf("%6.1f",*(*(p+n)+i));
}
int main()
{
float score[3][4]= {65,67,70,60,80,87,90,81,90,99,98,100};
average(*score,12);
search(score,2);
return 0;
}