#include <string>
#include <iostream>
#include <sstream> 
#include <iomanip>
#include <time.h>
#include <stdlib.h>
#include <stdio.h>
using namespace std;

int main(int argc, char* argv[])
{
   //Question 16

	//Variable

	stringstream  stream;

    double totalMM = 0.0;
    
	string countinput;

	double rainfall[5];

	double array[5];
	
	double average1;


	// Allows The User To Enter 5 Same or Different Measurements 

	cout << endl << "Enter 1st Measurement" << endl << endl;
	getline(cin, countinput);
	stream.str(countinput);
	stream >> rainfall[0];
	stream.clear();

    totalMM = rainfall[0] + totalMM;


	cout << endl << "Enter 2nd Measurement" << endl << endl;
	getline(cin, countinput);
	stream.str(countinput);
	stream >> rainfall[1];
	stream.clear();

     totalMM = rainfall[1] + totalMM;

	cout << endl << "Enter 3rd Measurement" << endl << endl;
	getline(cin, countinput);
	stream.str(countinput);
	stream >> rainfall[2];
	stream.clear();

     totalMM = rainfall[2] + totalMM;

	cout << endl << "Enter 4th Measurement" << endl << endl;
	getline(cin, countinput);
	stream.str(countinput);
	stream >> rainfall[3];
	stream.clear();

     totalMM = rainfall[3] + totalMM;

	cout << endl << "Enter 5th Measurement" << endl << endl;
	getline(cin, countinput);
	stream.str(countinput);
	stream >> rainfall[4];
	stream.clear();

     totalMM = rainfall[4] + totalMM;

	// Shows The List Of Measurements

	cout << endl << "1st Measurement = " << rainfall[0] << " MM" << endl << endl;
	cout << endl << "2nd Measurement = " << rainfall[1] << " MM" << endl << endl;
	cout << endl << "3rd Measurement = " << rainfall[2] << " MM" << endl << endl;
	cout << endl << "4th Measurement = " << rainfall[3] << " MM" << endl << endl;
	cout << endl << "5th Measurement = " << rainfall[4] << " MM" << endl << endl;

	//Shows The Total Measurements

	cout << endl << "Total Measurements =  " << totalMM << " MM" << endl << endl;

    //Calculate The Average
	average1 = totalMM / 5;
	
    cout << std::fixed << std::setprecision(1);
    
	cout << endl << "The Average =  " << average1 << " MM" << endl << endl;

//Pause
cin.get();

return 0;
}