/*  program function_1.cpp		9/17/00	
	author: 	John Howell		ext. 1670			drawer 76
	Purpose: To illustrate the stucture of a function
*/
	
#include <iostream.h>

double larger_of_2 (double a, double b)
{
	/* This function receives two integers arguments, "a" and "b"
	   it sends back the larger of the two.
	   If a = b, the function returns the value of b (which is the same as a)
	*/
	
	if (a > b)    return a;
		else return b;
}

int main ( )
{
	double n_1, n_2, bigger;
	do
	{
		cout << "Enter two doubles, and I'll tell you the larger of them (0 0 to quit): ";
		cin >> n_1 >> n_2;
		
		bigger = larger_of_2 (n_1, n_2);
		
		cout << "The larger is "<< bigger<<endl;
	}  while ((n_1 != 0) && (n_2 != 0));
	return 0;
}


