Answered step by step
Verified Expert Solution
Question
1 Approved Answer
IN C++ 3. Test Averaging: This program receives five test scores from the user and calculates the average. The prompt to the user are required
IN C++
3. Test Averaging: This program receives five test scores from the user and calculates the average. The prompt to the user are required for the assignment but purposely commented out for auto grading purposes. This program contains some errors, both syntax and logical. Fix the errors and submit for grading. The following is example input and expected output. Input: 80 85 89 90 95 Output: The average score is: 87.8 7 #include // Complete the statement 8 #include // Complete the statement - library for formatting output 9 using namespace std; 10 11 int main() // Declare constant to hold the number of tests entered const double NUM_TESTS = 4; // Variables - declare 5 variable of double type to hold // the test scores and one to hold the test score average double test Scorel, // To hold the 1st test score test Score2, // To hold the 2nd test score test Score4, // To hold the 4th test score test Score5, // To hold the 5th test score test ScoreAvg; // To hold the test score average // BEFORE SUBMITTING TO VOCAREUM // Comment out the cout statement that tells the user what to enter. // Do not delete; just add double forward slashes before the statement. 30 // // Prompt the user and get test score #1. cout > test Scorel; 33 34 // // Prompt the user and get test score #2. cout > test Score3; 42 // // Prompt the user and get test score #4. cout > test Scorel; // Prompt the user and get test score #5. cout > test Score5; // Calculate the test score average. test ScoreAvg = test Scorel + test Score2 + test Score3 + test Score 4 + test Score5 / NUM TESTS // Display the result. // Make sure to use the EXACT words shown in the example output. coutStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started