Question: Problem: Grading Function # Write a function called getScore() that does not take any parameter. Inside the function, it asks the user to input scores
Problem: Grading Function
#Write a function called getScore() that does not take any parameter. Inside the function, it asks the user to input scores for 3 e xams (Each of the e xams is out of 100). The final score is calculated by 20% of e xam1 + 30% of e xam2 + 50% of e xam 3. After calculating the final score, the function returns it to the caller. The scores are floating-point numbers.
#Write another function called getLetterGrade() that takes a float parameter and returns the letter grade based on the number passed to it as an actual parameter.
#Write the main function to test your program.
Call the getScore() function from the main function and after getting the final score from the getScore function, you should call the getLetterGrade() function to get the Grade for that score. Then print the letter grade returned by the getLetterGrade() function [So, you are printing the letter grade from the main function based on the grade returned by the getLetterGrade() function].
Here is the scale of the letter grade:
-
A [>=90]
-
B [80 90)
-
C [70 80)
-
D[ 60 70)
-
F [<60]
This should be done In the C programming language.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
