69,373
社区成员
发帖
与我相关
我的任务
分享
#include "stdafx.h"
#include<conio.h>
float*search(float(*p)[4])
{
int i;
float*pt;
pt = *(p + 1);
for (i = 0; i<4; i++)
{
if (*(*p + i)<60)
pt = *p;
}
return(pt);
}
int _tmain(int argc, _TCHAR* argv[])
{
float score[][4] = { { 60, 75, 82, 91 }, { 75, 81, 91, 90 }, { 51, 65, 78, 84 }, { 65, 72, 78, 72 } };
float*p;
int i, j;
for (i = 0; i<4; i++)
{
p = search(score + i);
if (p == *(score + i))
{
printf("The student NO.%d list:", i + 1);
for (j = 0; j<4; j++)
printf("%5.1f", *p);
}
}
getchar();
return 0;
}