//Diego Martinez CSC5 Chapter 2, P. 84,#18
/*******************************************************************************
* Calculating Energy Drink Consumption
* ______________________________________________________________________________
* This program calculates the amount of people that purchases one or more
* energy drink a week and computes how many prefer the citrus flavored energy
* drinks.
*
* Computation is based on the Formula:
* Energy Drink Customers = Total Customers * Energy Drink Percentage
* Citrus Customers = Energy Drink Customers * Citrus Percentage
*_______________________________________________________________________________
* INPUT
* totalCustomers : Total customers surveyed
* energydrinkPercent : The Percent of Customers the purchase weekly
* citrusPercent : Percent that prefers the citrus flavor
*
* OUTPUT
* energyDrinkCustomers : Weekly Customers
* citrusCustomers : Citrus Customers
*******************************************************************************/
#include <iostream>
using namespace std;
int main()
{
//Total Number of Surveyed Customers
int totalCustomers = 12467;
//Percentages
double energyDrinkPercent = 0.14;
double citrusPercent = 0.64;
//Calculations
double energyDrinkCustomers = totalCustomers * energyDrinkPercent;
double citrusCustomers = energyDrinkCustomers * citrusPercent;
//Output results
cout << "Approximate number of customers who purchase one or more energy drink per week: "
<< energyDrinkCustomers << endl;
cout << "Approximate number of customers citus flavored energy drinks: "
<< citrusCustomers << endl;
return 0;
}