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
Inessa [10]
3 years ago
7

Complete function PrintPopcornTime(), with int parameter bagOunces, and void return type. If bagOunces is less than 3, print "To

o 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:
Engineering
1 answer:
weqwewe [10]3 years ago
8 0

Answer:

#include <iostream>

using namespace std;

void PrintPopcornTime(int bagOunces) {

if(bagOunces < 3){

 cout << "Too small";

 cout << endl;

}

else if(bagOunces > 10){

 cout << "Too large";

 cout << endl;

}

else{

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

}

}

int main() {

  PrintPopcornTime(7);

  return 0;

}

Explanation:

Using C++ to write the program. In line 1 we define the header "#include <iostream>"  that defines the standard input/output stream objects. In line 2 "using namespace std" gives me the ability to use classes or functions, From lines 5 to 17 we define the function "PrintPopcornTime(), with int parameter bagOunces" Line 19 we can then call the function using 7 as the argument "PrintPopcornTime(7);" to get the expected output.

You might be interested in
The two basic categories of electrical switches are manual and ??
Ganezh [65]

Answer:

are Manual and Automatic

4 0
3 years ago
Read 2 more answers
Ammonia is one of the chemical constituents of industrial waste that must be removed in a treatment plant before the waste can s
Yanka [14]

Answer:

Following is attached the solution or the question given.

I hope it will help you a lot!

Explanation:

5 0
3 years ago
After a car is jump started, you should allow the car to run without stopping for _____.
True [87]
At minimum 10-20 minutes
8 0
3 years ago
Read 2 more answers
Que os vizinhos diziam sempre aq lenhador? Responda com elementos do texto.​
Alecsey [184]

Answer:

shsisdnd ajwdhdjeo sisksdne suspended wowodndjd

4 0
3 years ago
Describe the algorithm you use for looking up a person’s telephone number in the phone book. The input is person’s name; the out
Stella [2.4K]

Answer:

The Algorithm for finding a number from a phone book with the person's name as the input and the phone number as output is as follows:

1. Try to remember the name, i.e last name first and first name last, Also make sure you get the spelling right.

2. Using the first letter of the last name, locate the appropriate alphabetical section in which the name should appear.

3. Using the second letter of the last name, find the subsection of first and second letters combined, in the appropriate order, in which the name should appear. (If the last name consists of only two letters, find the appropriate first name.)

4. Using the third letter, find the possible names in a subsection of the first three letters in the correct order. Continue this step with x+1 letters of the name until you have a subsection of names exactly matching the last name of the person whose number you are trying to locate. (x is the number of letters used in the previous step, consistently.) If there is only one of the last name, (check for duplicates) identify the number, and return phone number information.

5. Begin the second step using the first letter of the first name, but limit the section to only those exactly matching the last name. Continue to step 4, again focusing on the first name only within the set of exactly matching last names.

6. When both first and last name match the name you are locating, check for duplicates. IF there are no duplicates, return phone number information.

Explanation:

People's names are generally arranged in phone books in alphabetical order by the last name of the person. The first name of the person is listed after the last name so that people of the same last name can be differentiated.

7 0
4 years ago
Read 2 more answers
Other questions:
  • You are considering building a residential wind power system to produce 6,000 kWh of electricity each year. The installed cost o
    15·1 answer
  • When the rope is at an angle of α = 30°, the 1-kg sphere A has a speed v0 = 0.6 m/s. The coefficient of restitution between A an
    8·1 answer
  • ____________________________________________ help scientists understand processes in the natural world by providing simpler repr
    11·2 answers
  • A resource has value, and people are willing to pay for it most likely because the resource is
    9·2 answers
  • TIMED TEST!!!!!!!!!!!!What process that occurred in the Midwestern United States in the 1930s is now occurring in the Sahel regi
    5·1 answer
  • Faster air movement over an airfoil creates a _________ pressure field, which in turn allows lift.
    7·1 answer
  • What color is an orange? its for my 8th grade
    13·1 answer
  • A 60-Hz 3-phase induction motor is required to drive a load at approximately 850 rpm. How many poles should the motor have
    9·1 answer
  • Petroleum engineers work almost exclusively with dry materials.<br><br><br> False<br> True
    13·1 answer
  • Draw isometric projection of a pls help
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!