int main()
{
float score[][4]={{60,47,80,26},{65,59,67,90},{43,78,90,56}};
float *search(float(*pionter)[4],int *pn);
float *p;
int i,k=0,flag=1;
for(i=0;i<3;i++,k=0,flag=1)
{
while((p=search(score+1,&k))==*(score+1))
{
if(flag)
{
printf("\nNo. %d score:",i);
flag=0;
}
printf("%7d %d5.1f",k+1,*(p+k));
k++;
}
}
}
float *search(float(*pointer)[4],int *pn)
{
int i;
float *pt;
pt=*(pointer+1);
for(i=*pn;i<4;i++)
{
if(*(*pointer+1)<60)
{
*pn=i;
return *pointer;
}
}
return pt;
}
{
float score[][4]={{60,47,80,26},{65,59,67,90},{43,78,90,56}};
float *search(float(*pionter)[4],int *pn);
float *p;
int i,k=0,flag=1;
for(i=0;i<3;i++,k=0,flag=1)
{
while((p=search(score+1,&k))==*(score+1))
{
if(flag)
{
printf("\nNo. %d score:",i);
flag=0;
}
printf("%7d %d5.1f",k+1,*(p+k));
k++;
}
}
}
float *search(float(*pointer)[4],int *pn)
{
int i;
float *pt;
pt=*(pointer+1);
for(i=*pn;i<4;i++)
{
if(*(*pointer+1)<60)
{
*pn=i;
return *pointer;
}
}
return pt;
}