#include
#include
Int number;
The int class;
# define MAX_NUM 30
# define MAX_CLASS 6
# define MAX_LEN 10
Typedef struct student {
Long ID;
Char name [MAX_LEN];
Float * result [];
} STU.
Void sumaver1 (float * result []);
//void sumaver2 (float * result []);
Int main ()
{
STU STU.
int i;
Printf (" Input student number (n<30) : \ n ");
The scanf (" % d ", & amp; Number);
Printf (" Input course number (m<=6) : \ n ");
The scanf (" % d ", & amp; The class);
Printf (" Input the student 's ID, name and result: \ n ");
for(i=1; i<=number; I++) {
The scanf (" % ld % s % f ", & amp; Stu. ID & amp; Stu. Name, & amp; Stu. Result);
}
Sumaver1 (stu. Result);
return 0;
}
Void sumaver1 (float * result []) {
int i;
Int n;
Int sum [MAX_CLASS]={0};
Double business [MAX_CLASS]={0.0};
for(i=0; i
}
Business, [I]=1.0 * sum [I]/class;
}
for(i=0; i
}
}
Small white sincerely ask, just didn't take long to learn c language, encountered such a situation very meng, autistic!
CodePudding user response:
Someone, and a big help me have a lookCodePudding user response:
Send an error message and have a lookCodePudding user response:
All the classGaicheng
Class1
Chinese input doesn 't last come out.
CodePudding user response:
Chinese input method is finally outHad been not to come out
The class is a c + + keyword
All the class to class1 or something
CodePudding user response:
Don't have to use what define, haven't to this stage, with const first, simplify the procedure absolute, oneself is to understand theCodePudding user response:
The