//Andres Guzman CSC5 Chapter 3, P. 143, #3
//
/**************************************************************
*
* FIND THE TEST AVERAGE
* ____________________________________________________________
* This program computes the average amongst 5 tests
*
* Computation is based on the formula:
* sum = test1 + test2 + test3 +test4 + test5
* average = sum / 5
* ____________________________________________________________
* INPUT
* test1 :test score
* test2 :test score
* test3 :test score
* test4 :test score
* test5 :test score
* OUTPUT
* sum : total score of all tests
* average = average of all tests
**************************************************************/
#include <iostream>
#include <string>
#include <iomanip>
#include <cmath>
using namespace std;
int main ()
{
//
//Initializing variables for input
int test1, test2, test3, test4, test5; //Input areas for each test score
//
//Output results
cout << "The score from test 1: ";
cin >> test1;
cout << "\nThe score from test 2: ";
cin >> test2;
cout << "\nThe score from test 3: ";
cin >> test3;
cout << "\nThe score from test 4: ";
cin >> test4;
cout << "\nThe score from test 5: ";
cin >> test5;
//
//Compute average formula
int sum = test1 + test2 + test3 + test4 + test5;
float average = sum / 5; // Output average of all test scores
//
//Output result
cout << "\nThe average among the tests: ";
cout << fixed << setprecision(1) << average << endl;
return 0;
}