C语言 求C语言大佬帮忙

课程记录由课程号、课程名称、学分组成,将课程记录存放在结构体数组中。请编程求出最高的课程记录(可能不止一门课程)并输出。要求:课程数、课程记录均由键盘输入。

求出最高的课程记录是指考试成绩还是学分呢?

参考一下这个看看:

#define N 2
struct Student
{
	//学号
	int		num; //成员变量或者一个数据项
	//姓名
	char	name[20];
	//性别
	char	sex; //M,F
	//成绩
	float	html;	
	float	ppt;
	float	cyuyan;
	float	sum;
}st[N];
void input();
void display();
void main()
{
    input();
    display();
}
//输入函数
void input()
{
	int i;
	for(i=0;i<N;i++)
	{
		printf("请输入第%d个学生的学号,姓名,性别,html,ppt,cyuyan:",i+1);
		scanf("%d",&st[i].num);
		scanf("%s ",st[i].name);
		scanf("%c ",&st[i].sex);
		scanf("%f",&st[i].html);
		scanf("%f",&st[i].ppt);
		scanf("%f",&st[i].cyuyan);
		st[i].sum = st[i].html+st[i].ppt+st[i].cyuyan;
	}
		
}
//输出
void display()
{
	int i;
	printf("学号\t姓名\t\t性别\thtml\tppt\tC语言\t总分\t平均分\n");	
	for(i=0;i<N;i++)
	{
		printf("%d\t%s\t%c\t%0.2f\t%0.2f\t%0.2f\t%0.2f\t%0.2f\n",st[i].num,st[i].name,st[i].sex,st[i].html,st[i].ppt,st[i].cyuyan,st[i].sum,st[i].sum/3);
	}	
}

 

您的问题已经有小伙伴解答了,请点击【采纳】按钮,采纳帮您提供解决思路的答案,给回答的人一些鼓励哦~~

ps:开通问答VIP,享受5次/月 有问必答服务,了解详情↓↓↓

【电脑端】戳>>>  https://vip.csdn.net/askvip?utm_source=1146287632
【APP 】  戳>>>  https://mall.csdn.net/item/52471?utm_source=1146287632