Write a program that reads in Lab scores, Homework scores, Quiz scores and Exam scores and then produces a weighted average. The weighted average will be based on what percent each of the stated categories. When the percentages of each category are added, they total 100%. All scores will be given on a 0 to 100 point basis.
Presume the following about each category:
30% of the course grade
20% of the course grade
11% of the course grade
39% of the course grade
Sample input (parenthesis denote the type):
89 95 85 75 85 90 95 55 90 (Labs)
90 85 88 100 30 (Homework)
99 100 98 76 80 85 (Quizzes)
56 85 95 (Exams)
You may presume all points for labs, homework, quizzes and exams will be positive.
You must ensure the totals for each category is greater than 0.
The name may contain spaces.
MAX is set to 100 – You must use this in your code
TOTAL is set to 10 – You must use this in your code
You must ensure all values are in range meaning the user can’t enter a number for the type that is less than 0 or greater than TOTAL. You must ensure the scores are between 0 and 100 inclusive.
Once the array has been filled, report the percentage earned in each category followed by the weighted percentage – after 2 decimal points the value will be rounded up.
Report the Grade Point for the course based on the following formula:
4.2 – (( 100 – Avg. Percentile Score) / 12)
No grade is ever rounded up
Student Name: Stu Steiner
89 95 85 75 85 90 95 55 90 (These were the entered values displayed this way for space) Lab Average – 84.3%
90 85 88 100 30 (These were the entered values displayed this way for space)
Homework Average – 78.6%
99 100 98 76 80 85 (These were the entered values displayed this way for space)
Quiz Average – 89.7%
56 85 95 (These were the entered values displayed this way for space)
Exam Average – 78.7%
Your weighted percentage is: XX.X%
Your final grade is: Y.Y
cscd240Lab3.c will contains my main() you may not change main but you will add your code in the functions at the bottom of the file
You must use static arrays
You must use stdin – All scores will be entered on the keyboard All input scores will be integer values
To Turn In
A zip file containing the folder Lab3 and:
all files necessary to compile and grade your code An output capture named cscd240lab3out.txt
Your zip will be named your last name first letter of your first name lab3.zip (Example: steinerslab3.zip)