高悬赏!!!!C语言课程设计 学生成绩管理系统《急!!!!!!》求高手帮忙!!

2024-11-18 15:55:30
推荐回答(4个)
回答1:

#include "stdio.h"
#define N 10
struct student
{char num[10];
char name[20];
float score[3];
float sum;
float aver;
}stu[N];
void main()
{
void count(struct student stu[]);
void sort(struct student stu[]);
void find(struct student stu[]);
int i;
float temp;
for(i=0;i{printf("enter data of the%dth student:\n",i+1);
printf("number: ");
gets(stu[i].num);
printf("name: ");
gets(stu[i].name);
printf("score1: ");
scanf("%f",&temp);
stu[i].score[0]=temp;
printf("score2: ");
scanf("%f",&temp);
stu[i].score[1]=temp;
printf("score3: ");
scanf("%f",&temp);
getchar();
stu[i].score[2]=temp;
}
count(stu);
printf("\n");
sort(stu);
printf("\n");
find(stu);
}

void count(struct student stu[])
{float sum,aver;
int i,j;
for(i=0;i {sum=0;
for(j=0;j<3;j++)
sum+=stu[i].score[j];
aver=sum/3.0;
stu[i].sum=sum;
stu[i].aver=aver;
}
printf("number name sum average \n");
for(i=0;iprintf("%-8s%-10s%-9.2f%-9.2f\n",stu[i].num,stu[i].name,stu[i].sum,stu[i].aver);
}

void sort(struct student stu[])
{int i,j,k;
struct student temp;
for(i=0;i {k=i;
for(j=i+1;j if(stu[k].sum if(k!=i)
{temp=stu[i];
stu[i]=stu[k];
stu[k]=temp;}
}
printf("number name score1 score2 score3 sum average \n");
for(i=0;i printf("%-8s%-10s%-8.2f%-8.2f%-8.2f%-8.2f%-8.2f\n",stu[i].num,stu[i].name,stu[i].score[0],stu[i].score[1],stu[i].score[2],stu[i].sum,stu[i].aver);
}

void find(struct student stu[])
{int i,j,sum,flag=0;
printf("the student of two scores<60:\n");
for(i=0;i {
sum=0;
for(j=0;j<3;j++)
if(stu[i].score[j]<60)sum++;
if(sum>=2)
{flag=1;
printf("%-8s%-10s\n",stu[i].num,stu[i].name);
}
}
if(flag==0)
printf(" not exist!\n");
}

回答2:

可以借助Baidu Hi示意我们
有机会可能完成你所面临的任务
具体的要求也可能示意我们
高悬赏!!!!C语言**** 学生成绩管理**《急!!...
ES:\\912645955D840C169388A7EFF9F58CCD

回答3:

我有只是不是按菜单排的。。功能差不多,要么?

回答4:

你题目也太长了,相当于是做一个项目了,怎么可能在短时间做成