全wa,求助
查看原帖
全wa,求助
1403564
lvcb248楼主2024/11/6 17:50
#include<stdio.h>
#include<stdlib.h>
#include<math.h>
#include<string.h>

struct student
{
	long long int  a;
	int xueye;
	int szhi;
	int zhe;
	int (*next)(int,int);
}stu[1500];

int p(int,int);
int p(int a,int b)
{
	return a+b;
}

void res(struct student s);
void res(struct student s)
{
	s.next=p;
	if(s.zhe>=800&&s.next(s.xueye,s.szhi)>140)
	{
		printf("Excellent\n");
	}else
	{
		printf("Not Excellent\n");
	}
}
int main()
{
   int n,i,u;
  scanf("%d",&n);
  for(i=0;i<n;i++)
  {
  	scanf("%lld",&stu[i].a);
  	scanf("%d",&stu[i].xueye);
  	scanf("%d",&stu[i].szhi);
  	stu[i].zhe=(7*stu[i].xueye+stu[i].szhi*3);
  }
  
   for(i=0;i<n;i++)
   {
	    res(stu[i]);
   }
   
	return 0;
}
2024/11/6 17:50
加载中...