1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Gennadij [26K]
3 years ago
12

Energy Drink Consumption A soft drink company recently surveyed 16,500 of its customers and found that approximately 15 percent

of those surveyed purchase one or more energy drinks per week. Of those customers who purchase energy drinks, approximately 58 percent of them prefer citrus-flavored energy drinks. Write a program that displays the following: The approximate number of customers in the survey who purchase one or more energy drinks per week The approximate number of customers in the survey who prefer citrus-flavored energy drinks.
Computers and Technology
1 answer:
slamgirl [31]3 years ago
5 0

Answer:

Follows are the code to this question:

#include <iostream>//header file

using namespace std;

int main()//defining a main method

{

int customer= 16508;//defining an integer variable

int E_drink, C_drink;//defining an integer variable

double buy_Energy_drink,buy_cold_drink;//defining a double variable

buy_Energy_drink= 0.15;//use double variable to assign value

buy_cold_drink= buy_Energy_drink *0.58;//use double variable to calculate value

E_drink = customer*buy_Energy_drink;//calculating value of E_drink

C_drink= customer*buy_cold_drink;//calculating value of E_drink

cout<<"\t\t\t -:Energy Drink Consumption:-"<<endl;//print message

cout<<"According to A soft drink company surveyed 16,500 of its customers."<<endl;//print message

cout<<E_drink <<" customer purchase one or more energy drinks per week."<<endl;//print message with value

cout<<C_drink <<" customer who prefer citrus-flavored energy drinks."<<endl;//print message with value

return 0;

}

Output:

Please find the attached file.

Explanation:

In this code, three integer variable "customer, E_drink, and C_drink" is defined, in which the first variable is used to hold a value, and the next two variables are used for calculating the value.

In the next step, two double variables "buy_Energy_drink, buy_cold_drink" is defined that calculate the given percentage value and passed into the integer variable to calculate the value and print the value with the given message.

You might be interested in
In C++ please.
natali 33 [55]

Answer:

Following are the code to this question:

#include <iostream>//defining header file  

using namespace std;    

bool rightTriangle(int s1,int s2,int s3) //defining method rightTriangle  

{

int t1,t2,t3; //defining integer variables

t1 = s1*s1; // multiplying side value and store it into declaring integer  variables

t2 = s2*s2; // multiplying side value and store it into declaring integer variables

t3 = s3*s3;  // multiplying side value and store it into declaring integer variables

if(t3 == t1+t2)//use if block to check Pythagoras theorem

{

return true; //return true

}

else //else block

{

return false; //return false

}

}

bool equalNums(int n1,int n2,int n3,int n4) //defining method equalNums  

{

if(n1==n3 && n2==n4) //defining if block that checks  

{

return true;//return value true  

}

else //else block  

{

return false; //return value false

}

}

int main()//defining main method

{  

int t1=3,t2=4,t3=5,t11=3,t12=4,t13=5; //declaring integer varibles and assign value  

int check=0;   //defining integer varible check that checks values

if(rightTriangle(t1,t2,t3)&&rightTriangle(t11,t12,t13)) //defining codition to check value using and gate

{

if(equalNums(t1,t3,t11,t13) || equalNums(t2,t3,t12,t13)) // defining conditions to check value using or gate

check = 1; //if both conditions are true

}

if(check==1) //if block to check value is equal to 1

{

cout << "Right Congruent Triangles"; //print message

}

else//else block

{

   cout << "Not Right Congruent Triangles";//print message

}

}

Output:

Right Congruent Triangles

Explanation:

  • In the above-given code, a boolean method "rightTriangle" is declared, in which it accepts three integer variable "s1, s2, and s3" as a parameter, inside the method three another variable "t1, t2, and t3" is declared, in which parameter stores its square value.
  • In the next line, a conditional statement is declared that checks the "Pythagoras theorem" value and returns its value.  
  • In the next step, another method "equalNums" is declared, that accepts four integer parameter "n1, n2, n3, and n4", inside the method a conditional statement is used that uses an operator to check n1, n3, and n2, n4 value if it is true it will return true value else it will return false.
  • Inside the main method, integer variable and a check variable is defined that uses the if block to passes the value into the method and checks its return value is equal if all the value is true it will print the message "Right Congruent Triangles" else "Not Right Congruent Triangles".
7 0
3 years ago
Which of the following configuration files would you document
Nikolay [14]

Answer: B.you have modified a configuration file to mount these new file system automatically

Explanation:

Hope this helped...~DASH

4 0
3 years ago
What is the most common type of communication?
tamaranim1 [39]

Answer:

technology texting

Explanation:

omega lol

6 0
3 years ago
How do take a picture on this to ask?
Galina-37 [17]
What computer are you on, To take a screenshot on a chromebook press control shift then the switch screens button

If any other computer use snipping tool. Or look up how to screenshot on (Your computer)

Then click that paperclick and go to the file of the screenshot and click it. Then type in a question and click ask.
3 0
3 years ago
Jared makes two copies of an antivirus software package he just bought and sells one of the copies to Joshua. In this scenario,
sladkih [1.3K]

Answer: d) Illegal and unethical

Explanation:  Illegal term is used for the something that is incorrect according to regulation.The legal factor is not present in this type of activity and thus it is judged by the regulations as unauthorized act and can be concluded as act of crime .

Unethical term defines that something is incorrect in a moral way and the person doing the unethical activity lacks the principles in his/her nature.

Jared is also performing illegal act by selling the piracy  antivirus package of software .The act is unethical as well because Jared is lacking the basic morals e.g.-stealing is offensive and incorrect act.Thus the correct option is option(d).

Other options are incorrect because the  act done by Jared is against the conduct which is not legal and ethics are moral features which is not present in Jared's act.

5 0
3 years ago
Other questions:
  • A user receives a phone call from a person claiming to be from technical support. This person knows the users name and that the
    12·1 answer
  • Which option should u select to ignore all tracked changes in a document
    8·1 answer
  • What can help prevent issues related to downloading content from the internet
    11·2 answers
  • 10.
    13·1 answer
  • Explain by details operator overloading in C++ with example
    6·1 answer
  • an IPv6 packet has a 40 byte base header, a 20 byte destination options extension header (which is not used for routing) and 200
    5·1 answer
  • Formulate it as a tree search problem.
    15·1 answer
  • Cash cows are always in
    7·1 answer
  • Write a C program that reads two hexadecimal values from the keyboard and then stores the two values into two variables of type
    15·1 answer
  • A combination of numbers and symbols used to express a calculation. Question 11 options: Formula Formula Bar Worksheet Workbook
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!