//这个题目我有点理解不了 后半段代码是借鉴别人的
假设有M门课程N个学生(此处假设M为3,N为4),要求编程求各门课程的平均分,并查找M门课程均不及格的学生的成绩。用指针来实现。 其中求每门课程的平均分的函数为:void average (float(*p)[N])。 查找M门课程均不及格的学生成绩的函数为:void search (float(*p)[N])
输入格式:
输入3门课程的4个学生的成绩
输出格式:
求出每一门课程的平均成绩,保留1位小数。并输出每门课程不及格的学生和其不及格课程的成绩,保留2位小数。
输入样例:
在这里给出一组输入。例如:
50 60 70 90
40 70 80 80
30 50 60 90
输出样例:
1 course average is 67.5
2 course average is 67.5
3 course average is 57.5
1 course 1 student score is 50.00
2 course 1 student score is 40.00
3 course 1 student score is 30.00
#include <stdio.h>
#define N 4
#define M 3
void average (float(*p)[N]);
void search (float(*p)[N]);
int main(){
float a[M