Given Information:
Total number of customers = 12,467
Customers who purchase one or more energy drinks per week = 14%
Customers who prefer citrus flavored energy drinks = 64% of customers who purchase one or more energy drinks per week
Required Information:
1. the approximate number of customers in the survey who purchase one or more energy drinks per week
2. the approximate number of customers in the survey who prefer citrus flavored energy drinks
Code with Explanation:
#include <iostream>
using namespace std;
int main()
{
int customers = 12467; // total no. of customers given
int buy_drink; // to store the number of customers who buy one or more energy drinks per week
int citrus_drink; // to store the number of customers who prefer citrus flavored energy drinks
buy_drink = customers*0.14; // multiply total number of customers with the % of customers who buy energy drinks
citrus_drink = buy_drink*0.64; // multiply no. of customers who buy one or more energy drinks per week with % of customers who prefer citrus flavor
// display the results calculated above
cout<<"Total number of customers: "<<customers<<endl;
cout<<"Number of customers who buy one or more drinks per week: "<<buy_drink<<endl;
cout<<"Number of customers who prefer citrus flavored drinks per week: "<<citrus_drink<<endl;
return 0;
}
Output:
Total number of customers: 12467
Number of customers who buy one or more drinks per week: 1745
Number of customers who prefer citrus flavored drinks per week: 1116