// minValue.cc   P.Conrad for CISC181, Spring 2006
// Together with minValue2.cc, demonstrates overloaded functions

#include <iostream>

using std::cout;
using std::endl;



//  *********** NOTE THE USE OF THE TERNARY OPERATOR IN THIS FUNCTION ***
// function minValue for double values

double minValue( double x, double y ) 
{ 
  cout << "Called minValue with 2 double arguments: " << x << " "<< y << endl;
  return ( x < y ? x : y ); 

} // end minValue (double version)



int main(void)
{
   int firstResult = minValue( 5, 7 );         
   double secondResult = minValue( 5.0, 7.0 ); 

   cout << "The result of the first call is  :" << firstResult << "\n"
        << "The result of the second call is :" << secondResult << "\n"
        << endl;    
   
   return 0;  // success

} // end main







