// ~cs35/bill_2.cpp
// Use the SAME function that you used in "bill_1.cpp"

#include "CS35lib.h"

double find_bill ( int age, int weight)
{
	if (age >= 18)
	{ 
		return 15.00;
	} else {
		return weight *0.1;
	}
}


int main ()
{
	int age_1, age_2, age_3, weight_1, weight_2, weight_3;
	double bill_1, bill_2, bill_3, total;
	
	cout << "Patron 1, How old are you? ";
	cin  >> age_1;
	cout << "How much do you weigh? ";
	cin  >> weight_1;
	cout << "Patron 2, How old are you? ";
	cin  >> age_2;
	cout << "How much do you weigh? ";
	cin  >> weight_2;
	cout << "Patron 3, How old are you? ";
	cin  >> age_3;
	cout << "How much do you weigh? ";
	cin  >> weight_3;
// Evaluate all 3 bills	
	
	bill_1 = find_bill (age_1, weight_1);	
	bill_2 = find_bill (age_2, weight_2);
	bill_3 = find_bill (age_3, weight_3);
	total = bill_1 + bill_2 + bill_3;
	
	
	set_decimal(2);
	cout << "Patron 1, your meal will cost $"<<bill_1<<endl;
	cout << "Patron 2, your meal will cost $"<<bill_2<<endl;
	cout << "Patron 3, you5 meal will cost $"<<bill_3<<endl;
	cout << "The total will be $"<<total;
	return 0;
}
