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
What is the difference between auto fill and fill handle ?​
lidiya [134]

Answer:

  • Auto fill a software function that automatically completes data (like the data that has been entered previously) without the user needing to type it in full.

  • The Fill Handle is a feature in Excel that fills the data automatically with a specific pattern in your spreadsheet cell.

hope u liked the answer :)

7 0
3 years ago
Putting the word int into a code will create a string variable?
loris [4]

Answer:

Yes it will create a string variable

4 0
3 years ago
Write a program to calculate the total salary of the employees in an office. The program will first prompt the user to enter the
raketka [301]

Answer:

import java.util.Scanner;

public class Salary

{

public static void main(String[] args) {

   

    int numberOfEmployees;

    double payRate, numberOfHours, totalPay = 0;

       Scanner input1 = new Scanner(System.in);

       Scanner input2 = new Scanner(System.in);

       System.out.print("Enter the number of employees: ");

       numberOfEmployees = input1.nextInt();

       

       for(int i=1; i<=numberOfEmployees; i++) {

           System.out.print("Enter the pay rate for employee " + i + ": ");

           payRate = input2.nextDouble();

           System.out.print("Enter the number of hours worked: ");

           numberOfHours = input2.nextDouble();

           

           totalPay += (payRate * numberOfHours);

       }

       

       System.out.println("Total payment is: "+ totalPay);

}

}

Explanation:

- Declare the variables

- Ask the user the for the number of employees

- Inside the for loop, ask the user for pay rate and hours worked for each employee

- Calculate the total pay

- <u>Outside of the loop</u>, print the total pay

6 0
3 years ago
Read 2 more answers
Write a program in C++ to implement bubblesort using the swap function ?
marishachu [46]

C++ program for implementation of Bubble sort  

#include <bits/stdc++.h>  

using namespace std;  

 void swap(int *x, int *y)  /*Defining Swap function of void return type*/

{  

  int temp = *x;  //Swaping the values  

   *x = *y;  

   *y = temp;  

}  

void bubbleSort(int array[], int n) /*Defining function to implement bubbleSort  */

{  

  int i, j;  

  for (i = 0; i < n-1; i++)      

      for (j = 0; j < n-i-1; j++)  /*The last i components are already in location  */

      if (array[j] > array[j+1])  

          swap(&array[j], &array[j+1]);  //Calling swap function

}  

int main()  //driver function

{  

   int array[] = {3, 16, 7, 2, 56, 67, 8}; //Input array  

   int n = sizeof(array)/sizeof(array[0]);  //Finding size of array

   bubbleSort(array, n); //Function calling  

   cout<<"Sorted array: \n";  

   for (int i = 0; i < n; i++)  //printing the sorted array

       cout << array[i] << " ";  

   cout << endl;  

 return 0;  

}  

<u>Output</u>

Sorted array:  

2 3 7 8 16 56 67

3 0
3 years ago
Your supervisor has asked you to help with the orientation of three new office employees. Topics you're asked to present include
Crazy boy [7]

Answer:

Policy manual

Explanation:

A written document that is designed by the company to decide the rules and regulations for the employee to guide them about attendance and evaluation to achieve the desired goals is called Policy manual.

A handbook is provided to the employee at the time of joining of Job. All the policies related to employee such as dress code, attendance policy and evaluation policy. All the rules and regulations related to office are also present in this document.

The purpose of this document is to inform the new employees about guidelines of the company.

7 0
4 years ago
Other questions:
  • To instruct Oracle11 g to sort data in ascending order, enter ____ after the column name in the ORDER BY clause.
    15·2 answers
  • Can a computer will work more efficiently if you perform disk optimization
    9·1 answer
  • Live.com is Microsoft's free web-based email provider.<br> A. True<br> B. False
    6·1 answer
  • You recently discovered that Marketing1 can connect to Admin1, and Admin1 can connect to Marketing1, but neither of these comput
    11·1 answer
  • The three tasks within data harmonization, namely: data consolidation, data cleansing, and data formatting use techniques called
    8·1 answer
  • How many spaces should you use for an indent?
    10·1 answer
  • . Write a C++ Code to get a multiline statement Str1 from a user with a ‘$’ as return character (Hint:
    6·1 answer
  • Will give brainliest!<br> Who created binary, and does anyone have any idea how?
    13·1 answer
  • The head of small organization wants to install a network so that all the employees of different department can share various re
    14·1 answer
  • Which statements about grades are accurate? Check all that apply. Grades help indicate how well a student is understanding a cer
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!