//Jacklyn Isordia CSC5 Chapter 3, P. 143, #03
//
/**************************************************************
*
* Calculate Average Test Score
* ____________________________________________________________
* This program asks the user to enter five test scores. The
* program calculates the average of the five scores and displays
* the result formatted in fixed-point notation with one decimal
* place.
*
* Computation is based on the formula:
* Average Score = (Score1 + Score2 + Score3 + Score4 + Score5) / 5
* ____________________________________________________________
* INPUT
* score1 : first test score
* score2 : second test score
* score3 : thirsd test score
* score4 : fourth test score
* score5 : fifth test score
*
* OUTPUT
* average : average of the five test scores
*
**************************************************************/
#include <iostream>
#include <iomanip>
using namespace std;
int main()
{
float score1;
float score2;
float score3;
float score4;
float score5;
float average;
//
// Input Values
//
cout << "Enter test score 1: " << endl;
cin >> score1;
cout << "Enter test score 2: " << endl;
cin >> score2;
cout << "Enter test score 3: " << endl;
cin >> score3;
cout << "Enter test score 4: " << endl;
cin >> score4;
cout << "Enter test score 5: " << endl;
cin >> score5;
//
// Compute Average
//
average = (score1 + score2 + score3 + score4 + score5) / 5;
//
// Output Result
//
cout << fixed << setprecision(1);
cout << " The average test score is " << average << endl;
return 0;
}