The following array of structures is used to hold data of your IPC144 grade center strcut grades {char name[101]; unsigned final; unsigned total;} struct grades myClass[25]; Write a function that gets the class grades array as a parameter and prints the list of people who passed the course (a student passes a course if he/she passes the final as well as the total) and their total mark. The function should also print the class average at the end (based on the total marks)
The following array of structures is used to hold data of your IPC144 grade center
strcut grades {char name[101]; unsigned final; unsigned total;}
struct grades myClass[25];
Write a function that gets the class grades array as a parameter and prints the list of people who passed the course (a student passes a course if he/she passes the final as well as the total) and their total mark. The function should also print the class average at the end (based on the total marks)
void printPassedAverage(struct grades myClass, int size)
The output should be like this
Students passed:
---------------------
John Smith 85
Jane Doe 65
Roy Crowe 80
Julia Stuart 55
Rob Gates 60
Class average: 69
Step by step
Solved in 2 steps with 1 images