#include <iostream>
using namespace std;

class Math
{
	//private data numbers
private:
    int num1;
    int num2;
    int num3;
    int num4;
    int num5;

public:
    // constructor protoype
    Math(int first, int second, int third, int fourth, int fifth);

	//member function prototypes
    int Largest();
    int Smallest();
    int Total();
    float Average();
};

// constructor definition
Math::Math(int first, int second, int third, int fourth, int fifth)
{
	//assign values to all numbers
    num1 = first;
    num2 = second;
    num3 = third;
    num4 = fourth;
    num5 = fifth;
}//Math

//member function definitions

// Largest function
int Math::Largest()
{
	//compare all numbers to find the largest
    int answer = num1;

    if(num2 > answer)
    {
    	answer = num2;
    }//if
    
    if(num3 > answer)
    {
    	answer = num3;
    }//if
    
    if(num4 > answer)
    {
    	answer = num4;
    }//if
    
    if(num5 > answer)
    {
    	answer = num5;
    }//if

    return answer;
}//Largest

// Smallest function
int Math::Smallest()
{
	//compare all numbers to find the smallest
    int answer = num1;

    if(num2 < answer)
    {
    	answer = num2;
    }//if
    
    if(num3 < answer)
    {
    	answer = num3;
    }//if
    
    if(num4 < answer)
    {
    	answer = num4;
    }//if
    
    if(num5 < answer)
    {
    	answer = num5;
    }//if

    return answer;
}//Smallest

// Total function
int Math::Total()
{
	int total;
	
	//find the total of all the numbers
    total = num1 + num2 + num3 + num4 + num5;
    return total;
}//Total

// Average function
float Math::Average()
{
	float average;
	
	//find the Average of all the numbers
    average = Total() / 5.0;
    return average;
}//Average

// test main
int main()
{
    Math obj(10, 20, 30, 5, 15);

    cout << "Largest: " << obj.Largest() << endl;
    cout << "Smallest: " << obj.Smallest() << endl;
    cout << "Total: " << obj.Total() << endl;
    cout << "Average: " << obj.Average() << endl;

    return 0;
}