programming

2-5 Grade Determination is says " Write a program that will input three test scores. the program should determine and display their average. the program should then display the appropriate letter grade based on there average. the letter grade should be determined using a 10 point scale (a=90-100)(b=80-89.999)(c=70-79.999),etc.

Answers

possible solution #include using namespace std; int main() { // Declare and initialize the variables to store the 3 test scores double test1 = 0.0; double test2 = 0.0; double test3 = 0.0; //Prompt the user to enter the three tests scores cout << "Enter the first test score: "; cin >> test1; cout << "Enter the second test score: "; cin >> test2; cout << "Enter the third test score: "; cin >> test3; // Calculate the average of the three tests scores double average = (test1 + test2 + test3) / 3.0; // Determine and display the appropiate letter grade char letterGrade; if (average < 60) letterGrade = 'F'; else if (average < 70) letterGrade = 'D'; else if (average < 80) letterGrade = 'C'; else if (average < 90) letterGrade = 'B'; else letterGrade = 'A'; cout << "The average score is: " << average <<"\n"; cout

Answered by Eric Mathis

We have mentors from

Contact support