Question: Please write the code that would make the task work. I will RATE your answer In this part, you will implement code to know what

Please write the code that would make the task work.

I will RATE your answer

In this part, you will implement code to know what the minimum final test grade for an given

expected final grade. This code to allow the user to submit three values for partial text and the

expected final letter grade and get as output the minimum numerical final test grade.

Create this program in a file expected_grade.c using this template:

/*

* Programmer:

* Class: CptS 121, Spring 2018

* Programming lab:

* Date:

* Description:

*/

#include

int main(void)

{

/*

* The main function should implement these steps:

*

* 1. Prompt the user to enter the three double values and the final

* letter grade (score1, score2, score3, final_score_letter).

* 2. Check to make sure the double is positive and the letter is

* correct. If it isn't, print out an error message and exit.

* 3. Implement this pseudocode:

* calculate the minimum numerical value for the final_score_letter

* use the formula to calculate the fourth score

*

* score4 = 4*final_score-score1-score2-score3

* print the numerical grade for score4

*/

return 0;

}

Compile the program with:

$ cc -Wall expected_grade.c -o expected_grade

Here's a typical run:

enter score 1: 80.5

enter score 2: 90.0

enter score 3: 75.3

enter letter : B

The minimum numerical grade for the fourth score to a get a

final grade B is 74.2.

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!