struct student{
char name[20];
char s;
float course1;
float course2;
float course3;
};
main()
{
struct student stu[5];
float maxpoint,minpoint,sumpoint[5],avepoint,maxsumpoint,maxsumpoint2;
int i,mstu=-1;
for(i=0;i<=5;i++)
{
printf("请输入第%d个学生的信息",i+1);
scanf("%s%c%f%f%f",stu[i].name,&stu[i].s,&stu[i].course1,&stu[i].course2,&stu[i].course3);
}
maxpoint=stu[0].course1;
for(i=1;i<5;i++)
{
if(stu[i].course1>maxpoint)
maxpoint=stu[i].course1;
}
printf("最高分是%f",maxpoint);
avepoint=stu[0].course1;
for(i=1;i<5;i++)
{
avepoint=avepoint+stu[i].course1;
}
printf("平均分为:%f",avepoint/5);
}