c语言编程 高分

来源:百度知道 编辑:UC知道 时间:2024/05/14 19:40:32
有10个学生,每个学生的数据包括学号,姓名,性别,3门课的成绩.
要求:(1)求出3门课最高分的学生数据(包括学号,姓名,性别,3门课成绩,平均分);
(2)求出至少有一门以上功课不及格的学生,输出他们的学号,姓名,性别和全部课程成绩及平均分.
老师没教,叫我们自己做....这怎么做啊 就懂点做了两天了还是做不出来
只能靠大家了 - -!!!
要详细的.....如果写下程序分马上就送...
那个程序还是有问题.....谁能给个全的啊 要行我加分....

给我加分吧。程序已经测试过了!
llf18018为什么拷贝我的答案?太过分了吧?

#include <stdio.h>

#define SIZE 10

typedef struct {
int id;
char name[10];
int sex;
float score[3];
float av;
} STUDENT;

void input_stu (STUDENT stu[], int size);
int max_stu (STUDENT stu[], int size);
void show(STUDENT stu);
void not_pass (STUDENT stu[], int size);

main() {
STUDENT stu[SIZE];
int max;

input_stu (stu, SIZE);
max = max_stu (stu, SIZE);
printf ("\nmax student\n");
show(stu[max]);
not_pass (stu, SIZE);
getch();
return;
}

void not_pass (STUDENT stu[], int size) {
int i, j;
printf ("\nnot pass students\n");
for (i=0; i<SIZE; i++) {
for (j=0; j<3; j++) {
if (stu[i].score[j] < 60) {
show(stu[i]);
break;
}
}
}
}

vo