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;

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
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
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education