#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("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
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;i
}
void sort(struct student stu[])
{int i,j,k;
struct student temp;
for(i=0;i
for(j=i+1;j
{temp=stu[i];
stu[i]=stu[k];
stu[k]=temp;}
}
printf("number name score1 score2 score3 sum average \n");
for(i=0;i
}
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");
}
可以借助Baidu Hi示意我们
有机会可能完成你所面临的任务
具体的要求也可能示意我们
高悬赏!!!!C语言**** 学生成绩管理**《急!!...
ES:\\912645955D840C169388A7EFF9F58CCD
我有只是不是按菜单排的。。功能差不多,要么?
你题目也太长了,相当于是做一个项目了,怎么可能在短时间做成