#include<iostream>
using namespace std;

// multiply 3 numbers together
float multiply(float a, float b, float c);

// multiply 4 numbers together
float multiply(float a, float b, float c, float d);

// multiply 5 numbers together
float multiply(float a, float b, float c, float d, float e);


int main()
{
 float a,b,c,d,e;
 int numInputs;

 cout << "How many numbers to multiply together? ";
 cin >> numInputs;

 cout << "Enter " << numInputs << " number: ";

 switch(numInputs)
 {
   case 3:
     cin >> a >> b >> c;
     cout << "The product is " << multiply(a,b,c) << endl;
     break;
   case 4:
     cin >> a >> b >> c >> d;
     cout << "The product is " << multiply(a,b,c,d) << endl;
     break;
   case 5:
     cin >> a >> b >> c >> d >> e;
     cout << "The product is " << multiply(a,b,c,d,e) << endl;
     break;
 }

 return 0;
}


// Multiply 3 numbers
float multiply(float a, float b, float c)
{
 return a*b*c;
}


// Multiply 4 numbers
float multiply(float a, float b, float c, float d)
{
 return a*b*c*d;
}

// Multiply 5 numbers
float multiply(float a, float b, float c, float d, float e)
{
 return a*b*c*d*e;
}