//Sam Trivikraman CS1A Chapter 3, p.143, #3
//
/*
******************************************************************************
Calculate the average of five test scores
_______________________________________________________________________________
This program calculates the average from five test scores that the user inputs.
_______________________________________________________________________________
INPUT
scoreOne : the first test score (user input)
scoreTwo : the second test score (user input)
scoreThree : the third test score (user input)
scoreFour : the fourth test score (user input)
scoreFive : the fifth test score (user input)
OUTPUT
averageTestScore : the total average score from the five given test scores
_______________________________________________________________________________
*******************************************************************************
*/
#include <iostream>
#include <iomanip>
using namespace std;
int main() {
float scoreOne; //INPUT the first test score
float scoreTwo; //INPUT the second test score
float scoreThree; //INPUT the third test score
float scoreFour; //INPUT the fourth test score
float scoreFive; //INPUT the fifth test score
float averageTestScore; //OUTPUT the total average score from the five given test scores
//Gather test score inputs from user
cout<< "Please enter five test scores separated by the ENTER key: " << endl;
cin >> scoreOne;
cin >> scoreTwo;
cin >> scoreThree;
cin >> scoreFour;
cin >> scoreFive;
//Calculate the average test score
averageTestScore = (scoreOne + scoreTwo + scoreThree + scoreFour + scoreFive) / 5;
//Set the precision to one decimal point
cout << fixed << setprecision(1);
//Output result
cout << "The average test score is: " << averageTestScore << endl;
return 0;
}