I need help In C  This program calculates and prints the total grades for students out of 100; then, it prints the number of students who got A’s, B’s, C’s, D’s, and F’s.    This program must implement the following functions:   double get_total(double grades[], int size);   This function receives a list of grades in the grades[] array and its size in the variable size. This function must calculate the total of the grades in grades[]. However, the function must drop the lowest quiz grade before calculating the total. Each grades[] list has the following elements order: {[Lab Exam/20] [Quiz 1/5] [Quiz 2/5] [Quiz 3/5] [Mid Exam/20] [Final Exam/50]}. The function will remove the lowest Quiz grade, and then it will precede to sum the rest of the grade. The total must not exceed 100. For example, if you pass 15, 5, 5, 3, 19, 46 to the function, the function will remove the three, and you will get 90. Another example, 17, 3, 1, 2, 17, 45, the function will return 84.    char get_letter_grade(double *grade);   This function receives a pointer to a grade and returns A if the grade is greater or equal to 90. B if the grade is less than 90 and greater than or equal to 80. C if the grade is less than 80 and greater or equal to 70. D if the grade is less than 70 and greater than or equal to 60. Finally, F if the grade is less than 60. grades_s get_distribution(double totals[], int totals_size); The function accepts a list of total grades totals[] for a number of students total_size. This function must return a grade_s struct which contains the number of occurrences of each grade letter in the list totals. The function must use char get_letter_grade(double *grade) to get the letter grade and the function must use a switch statement. For example, if totals are {70, 80, 74, 83, 100, 95, 94, 92, 99, 50, 60}, the return value must be a struct containing: a = 5, b = 2, c = 2, d = 1, f = 1.   should use the following structure:    typedef struct grade_distribution_s {  int f, d, c, b, a;  } grades_s;

C++ for Engineers and Scientists
4th Edition
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Bronson, Gary J.
Chapter7: Arrays
Section: Chapter Questions
Problem 6PP: (Numerical) a. Define an array with a maximum of 20 integer values, and fill the array with numbers...
icon
Related questions
Question

I need help In C 

This program calculates and prints the total grades for students out of 100; then, it prints the number of students who got A’s, B’s, C’s, D’s, and F’s. 

 

This program must implement the following functions:

 

double get_total(double grades[], int size);

 

This function receives a list of grades in the grades[] array and its size in the variable size. This function must calculate the total of the grades in grades[]. However, the function must drop the lowest quiz grade before calculating the total. Each grades[] list has the following elements order: {[Lab Exam/20] [Quiz 1/5] [Quiz 2/5] [Quiz 3/5] [Mid Exam/20] [Final Exam/50]}. The function will remove the lowest Quiz grade, and then it will precede to sum the rest of the grade. The total must not exceed 100. For example, if you pass 15, 5, 5, 3, 19, 46 to the function, the function will remove the three, and you will get 90. Another example, 17, 3, 1, 2, 17, 45, the function will return 84. 

 

char get_letter_grade(double *grade);

 

This function receives a pointer to a grade and returns A if the grade is greater or equal to 90. B if the grade is less than 90 and greater than or equal to 80. C if the grade is less than 80 and greater or equal to 70. D if the grade is less than 70 and greater than or equal to 60. Finally, F if the grade is less than 60. grades_s get_distribution(double totals[], int totals_size); The function accepts a list of total grades totals[] for a number of students total_size. This function must return a grade_s struct which contains the number of occurrences of each grade letter in the list totals. The function must use char get_letter_grade(double *grade) to get the letter grade and the function must use a switch statement. For example, if totals are {70, 80, 74, 83, 100, 95, 94, 92, 99, 50, 60}, the return value must be a struct containing: a = 5, b = 2, c = 2, d = 1, f = 1.

 

should use the following structure:

 

 typedef struct grade_distribution_s {

 int f, d, c, b, a; 

} grades_s; 

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 3 steps with 1 images

Blurred answer
Knowledge Booster
Array
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ for Engineers and Scientists
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning