//Ava Huntington CS1A Chapter 3 Homework P. 143, #3
//
/***************************************************************************
* AVERAGE FIVE TEST SCORES
* _________________________________________________________________________
* This programs takes the test scores on five given tests and finds the
* average of all five.
* _________________________________________________________________________
* INPUT
* test1: Score for given test #1
* test2: Score for given test #2
* test3: Score for given test #3
* test4: Score for given test #4
* test5: Score for given test #5
*
* OUTPUT
* avergeScore: Average of all five given test scores.
***************************************************************************/
#include <iostream>
#include <iomanip>
using namespace std;
int main()
{
float test1; //INPUT : Given score for test #1
float test2; //INPUT : Given score for test #2
float test3; //INPUT : Given score for test #3
float test4; //INPUT : Given score for test #4
float test5; //INPUT : Given score for test #5
float averageScore; //OUTPUT : Average of all five given test scores
//Prompt to find score for test 1
cout << "What is the score of test #1? "<<endl;
cin >> test1;
//Prompt to find score for test 2
cout << "What is the score of test #2? "<<endl;
cin >> test2;
//Prompt to find score for test 3
cout<<"What is the score of test #3? "<<endl;
cin>> test3;
//Prompt to find score for test 4
cout<<"What is the score of test #4? "<<endl;
cin>> test4;
//Prompt to find score for test 5
cout<<"What is the score of test #5? "<<endl;
cin>> test5;
//Prompt to ensure answers are seperated by spaces
cout<<"Please seperate answers with spaces. "<<endl;
//Equation to calculate the average of the five test scores
averageScore = (test1+test2+test3+test4+test5)/5.0;
//Final output of the test score averages
cout<< "The average test score for the five given tests is "
<<setprecision(3)<<averageScore << ". "<<endl;
return 0;
}