Question: You are asked to write a program which enters three test scores plus their weighting factors. The program then calculates the weighted average. Based on

 You are asked to write a program which enters three test

You are asked to write a program which enters three test scores plus their weighting factors. The program then calculates the weighted average. Based on that average it then determines the letter grade: A, B,C,D, or. F. The standard grading scale of 90s for an A,80s for a B, etc. Your program must have a main function and two additional functions that you create: calc_average and determine grade. The main program inputs three test scores (floats) with each score in the range of 0 to 100 . Also, input are three weighting factors which must be positive floating-point numbers not to exceed 3.0. Use while loops in the main to assure that all the test scores and weights are in the required range. The loops will exit only when the scores and weights are in the range noted. After the Input is validated, main calls calc average which accepts the three test scores and three weights as their parametera. The calc average then computes the weighted average and returns the value to the main function. Next main calls determine grade which takes the weighted average returned by calc average and uses selection structures to determine the letter grade (string data type). The main function then outputs the letter grade together with a message. If the grade is an A then "Congratulations" is printed. For a B the message is "Good Jab" and for a C the message is "Average work". For a D the print "You may need to repeat the course." Lastly print for an F, "Sorry, failure - repeat the course." Use the standard header comments and enclose output for three cases at the end of the file delimited by apostrophes

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!