//Jeremy Huang CS1A Chapter 3, P. 143, #3
//
/**************************************************************
*
* CALCULATE TEST AVERAGE
* ____________________________________________________________
* This program calculates the test average of 5 tests based on
* the scores given in the input and averaging by dividing by
* 5.
* ____________________________________________________________
* INPUT
* test1 : Score for test 1
* test2 : Score for test 2
* test3 : Score for test 3
* test4 : Score for test 4
* test5 : Score for test 5
*
* OUTPUT
* testAverage : Average of the test scores
*
**************************************************************/
#include <iostream>
#include <iomanip>
using namespace std;
int main() {
float test1; //INPUT - Score for test 1
float test2; //INPUT - Score for test 2
float test3; //INPUT - Score for test 3
float test4; //INPUT - Score for test 4
float test5; //INPUT - Score for test 5
float testAverage; //OUTPUT - Average of the test scores
//Prompt user for the score of Test 1
cout<<"\nEnter the score for Test 1: ";
cin>>test1;
//Prompt user for the score of Test 2
cout<<"\nEnter the score for Test 2: ";
cin>>test2;
//Prompt user for the score of Test 3
cout<<"\nEnter the score for Test 3: ";
cin>>test3;
//Prompt user for the score of Test 4
cout<<"\nEnter the score for Test 4: ";
cin>>test4;
//Prompt user for the score of Test 5
cout<<"\nEnter the score for Test 5: ";
cin>>test5;
//Calculate Test Average
testAverage = (test1+test2+test3+test4+test5)/5;
//Output Result
cout<<fixed<<showpoint<<setprecision(1);
cout<<"\nThe average of the test scores is: "<<testAverage;
return 0;
}