// Pranav Manur CS1A Chapter 2 pg. 81 #5
/*********************************************************************************
*CALCULATE THE AVERAGE OF 5 NUMBERS
*--------------------------------------------------------------------------------
* This program uses 2 basic math operations: addition and multiplication.
* The Program first lists the 5 numbers.
* Then the Program adds the numbers together giving the total.
* The program then finally divides the total by 5 giving us the answer.
*
* The program uses the following computation: Answer = total(#1+#2+#3+#4+#5) / 5
*---------------------------------------------------------------------------------
* INPUT
* 5 numbers used to calculate the total, and the reason why the total is divied
* by 5.
*
* OUTPUT
* The Average: The answer of the 5 number total being divied by 5
**********************************************************************************/
#include <iostream>
#include <iomanip>
#include <string>
using namespace std;
int main() {
// Create integer value data types
int num1;
int num2;
int num3;
int num4;
int num5;
//Assign values to previously created data types
num1 = 28;
num2 = 32;
num3 = 37;
num4 = 24;
num5 = 33;
//Compute the SUM (the total of the numbers added)
float sum = num1 + num2 + num3 + num4 + num5;
//Compute the Average
float average = sum / 5;
//Output Result
cout << "The sum of the numbers: " << num1 << " + " << num2 << " + "<<
num3<< " + " << num4 << " + " << num5 << " is " << sum <<
" ,therefore the average is " << average << "!" << endl;
return 0;
}