Create a program in C Language that calculates a student's overall grade based on their assignments, quizzes, and exams. Create three separate arrays of `double` which will store 5 assignments, 3 quizzes, and 2 exams, respectively. The program should prompt the user to enter the grades for each group on one line (see example). The program should then compute the average of each individual group and then weight that group based on the value given for the corresponding weight. In the example run below, the average assignment score is first calculated and then multiplied by the given assignment weight. The final grade is calculated as the sum of all weighted groups and should be printed to 2 decimal places. Submit your code as grades.c Other Requirements Do not hard code any values. Use preprocessor directives or `const` globals for array sizes. Your code must use consistent formatting and spacing. Points will be taken off for inconsistent or sloppy code. Example Run Enter 5 assignment scores: 100 86 98 32 77 Enter 3 quiz scores: 90 92 81 Enter 2 exam scores: 74 93 Enter assignment weight: 0.25 Enter quiz weight: 0.25 Enter exam weight: 0.5 Final Grade: 91.65

Programming Logic & Design Comprehensive
9th Edition
ISBN:9781337669405
Author:FARRELL
Publisher:FARRELL
Chapter6: Arrays
Section: Chapter Questions
Problem 5GZ
icon
Related questions
Question

Create a program in C Language that calculates a student's overall grade based on their assignments, quizzes, and exams. Create three separate arrays of `double` which will store 5 assignments, 3 quizzes, and 2 exams, respectively. The program should prompt the user to enter the grades for each group on one line (see example). The program should then compute the average of each individual group and then weight that group based on the value given for the corresponding weight.

In the example run below, the average assignment score is first calculated and then multiplied by the given assignment weight. The final grade is calculated as the sum of all weighted groups and should be printed to 2 decimal places.

Submit your code as grades.c

Other Requirements

  • Do not hard code any values. Use preprocessor directives or `const` globals for array sizes.
  • Your code must use consistent formatting and spacing. Points will be taken off for inconsistent or sloppy code.

Example Run

Enter 5 assignment scores: 100 86 98 32 77
Enter 3 quiz scores: 90 92 81
Enter 2 exam scores: 74 93
Enter assignment weight: 0.25
Enter quiz weight: 0.25
Enter exam weight: 0.5
Final Grade: 91.65

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps with 1 images

Blurred answer
Knowledge Booster
Program on Numbers
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
Programming Logic & Design Comprehensive
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
C++ for Engineers and Scientists
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr