// Exercise 2
//
// Write a function to return the maximum of two
// 'double' arguments
//

#include <iostream>

// Return the maximum of two doubles
double maximum(double x, double y) {
  if ( x > y ) {
    return x;
  } else {
    return y;
  }
}

// Test program for function maximum
int main(int argc, char** argv)
{
  double x, y;
  std::cout << "Please enter two values: " ;
  std::cin >> x;
  std::cin >> y;
  std::cout << "\nThe maximum of " << x << " and " << y << " is "
	    << maximum(x,y) << "\n";
  printf ("All done!\n");
}
