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
telo118 [61]
3 years ago
7

Using C++, complete function PrintPopcornTime(), with int parameter bagOunces, and void return type. If bagOunces is less than 2

, print "Too small". If greater than 10, print "Too large". Otherwise, compute and print 6 * bagOunces followed by "seconds". End with a newline. Example output for ounces = 7:42 seconds1 #include 2 using namespace std; 34 void PrintPopcornTime(int bagOunces) { 56 /* Your solution goes here */ 78 } 9 int main() { 10 int userOunces; cin >> userOunces; 11 PrintPopcornTime12 13 return 0; 14 }
Computers and Technology
1 answer:
victus00 [196]3 years ago
3 0

Answer:

#include <iostream>

using namespace std;

void PrintPopcornTime(int bagOunces) {

   if(bagOunces < 2)

       cout << "Too small" << endl;

   else if(bagOunces > 10)

       cout << "Too large" << endl;

   else

       cout << 6 * bagOunces <<" seconds" << endl;

}

int main()

{

   int userOunces;

   cin >> userOunces;

   PrintPopcornTime(userOunces);

   return 0;

}

Explanation:

Inside the function PrintPopcornTime, check the parameter bagOunces using if structure. Depending on the value of bagOunces, print the required information.

Inside the main, ask the user for the userOunces. Call the PrintPopcornTime function with the userOunces.

You might be interested in
Which of the following will increase the level of security for personal information on a mobile device if the device is lost or
mamaluj [8]

Answer:

this is a very cool day for me yeah know

3 0
2 years ago
Read 2 more answers
How many bytes make up a megabyte? One hundred One thousand One million One billion
Phoenix [80]
One million is the answer.
4 0
3 years ago
What does a network backbone do? allows data to be delivered more quickly and efficiently makes data transfer from the cloud mor
Musya8 [376]

Answer:

A network backbone connects multiple networks together, allowing them to communicate with each other.

5 0
3 years ago
Read 2 more answers
In a binary search, _______________________________ . a. It is assumed that all of the elements are integers. b. It is assumed t
madam [21]

Answer:

d. It is assumed that the search pool is ordered.

Explanation:

A binary search/logarithimic search/half interval search/binary chop refers to search algorithm in computer science that sorts data in array in key:value arrangements. In order to locate a value in binary search, the key to the value in a sorted array is located. A binary search is characterized by an ascending, descending order arrangement of the array.

6 0
3 years ago
Which is an example of a variable name written in camelcase?
NemiM [27]

Answer:

Option (a) myCar

Explanation:

Option (a) is Correct

If there are two or more words in variable we can use camel case to declare the variable. In camel case first character of first word is either a lowercase alphabet or underscore (_) and first character of second word is a uppercase alphabet. ex: empNum, myCar

So the Option (a) myCar is correct among the given options

Option (b) is incorrect

Since both the first letter of two words are in lower case which is not according to camel case rules

Option (c) is incorrect

The first letter of first word is in lower case first character of second word is a uppercase alphabet but there is a gap so it is not valid .

Option (d) is incorrect

The first word is in upper case and first character of second word is a uppercase alphabet it is not valid.

6 0
3 years ago
Read 2 more answers
Other questions:
  • Suppose you send data to the 11111111 11111111 11111111 11111111 ip address on an ipv4 network. to which device(s) are you trans
    15·1 answer
  • What would 128 kbps look like on a phone? i.e. 4g, 3g, 2g, etc
    9·1 answer
  • True/False: Audio menus can be useful when one's hands and eyes are busy, or to assist vision-impaired users. With audio menus,
    14·1 answer
  • Linda subscribes to a cloud service. The service provider hosts the cloud infrastructure and delivers computing resources over t
    10·1 answer
  • How can forms help us reduce data-entry errors?
    12·1 answer
  • A company has a hybrid ASP.NET Web API application that is based on a software as a service (SaaS) offering.Users report general
    9·1 answer
  • If cell G7 contains the function ________, it states that if the value in cell C3 is 9, the number 7 will be assigned to cell G7
    6·1 answer
  • WILL GIVE BRAINLIST IF ANSWER IS RIGHT AND YOU TELL ME HOW YOU GOT YOUR ANSWER (dont copy and past from a site)
    10·2 answers
  • Fill in the Blank
    10·2 answers
  • . Why is it important to use Social Media responsibly? ANSWER NOW!!!
    15·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!