如何修改这段代码啊
#include<stdio.h>#define N 3
#define M 4
void main()
{
void averge(float *p,int n);
void search(float (*p)[M],int n);
float score[N][M];
average(*score,12);
serach(score,2);
}
void average(float *p,int n)
{
float *p_end;
float sum=0,ave;
p_end=p+n-1;
for(;p<=p_end;p++)
sum=sum+(*p);
ave=sum/n;
printf("average=%5.2f\n",ave);
}
void serach(float(*p)[M],int n)
{
int i;
printf("the sorted of No.%d are:\n",n);
for(i=0;i<N;i++)
printf("%5.2f",*(*(p+n)+i));
}