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
An automobile weighing 2500 lbf increases its gravitational potential energy by a magnitude of 2.25 × 104 Btu in going from an e
Mila [183]

Answer:

The elevation at the high point of the road is 12186.5 in ft.

Explanation:

The automobile weight is 2500 lbf.

The automobile increases its gravitational potential energy in 2.25 * 10^4 BTU. It means the mobile has increased its elevation.

The initial elevation is of 5183 ft.  

The first step is to convert Btu of potential energy to adequate units to work with data previously presented.

British Thermal Unit - 1 BTU = 778.17  lbf*ft

2.25 * 10^4 BTU (\frac{778.17 lbf*ft}{1BTU} ) = 1.75 * 10^7 lbf * ft

Now we have the gravitational potential energy in lbf*ft. Weight of the mobile is in lbf and the elevation is in ft. We can evaluate the expression for gravitational potential energy as follows:  

Ep = m*g*(h_2 - h_1)\\ W = m*g  

Where m is the mass of the automobile, g is the gravity, W is the weight of the automobile showed in the problem.  

h_2 is the final elevation and h_1 is the initial elevation.

Replacing W in the Ep equation

Ep = W*(h_2 -h_1)\\(h_2 -h_1) = \frac{Ep}{W} \\h_2 = h_1 + \frac{Ep}{W}\\\\

Finally, the next step is to replace the variables of the problem.  

h_2 = 5183 ft + \frac{1.75 * 10^7 lbf*ft}{2500 lbf}\\h_2 = 5183 ft + 70003.5 ft\\h_2 = 12186.5 ft

The elevation at the high point of the road is 12186.5 in ft.  

3 0
3 years ago
Which of the following tools might civil engineers use when designing roads in a recently constructed industrial park?
Dmitry [639]

Answer:D. Gunter's Chain

Explanation:I know this because a gunter's chain is used for plots of land to be accurately surveyed and plotted, for legal and commercial purposes.

6 0
3 years ago
Read 2 more answers
A metal crystallizes with a face-centered cubic lattice. The edge of the unit cell is 408 pm. Calculate the number of atoms in t
uysha [10]

Answer:288 pm

Explanation:

Number of atoms(s) for face centered unit cell -

Lattice points: at corners and face centers of unit cell.

For face centered cubic (FCC), z=4.

- whereas

For an FCC lattices √2a =4r =2d

Therefore d = a/√2a = 408pm/√2a= 288pm

I think with this step by step procedure the, the answer was clearly stated.

8 0
3 years ago
Which is the correct definition of schematic?
DanielleElmas [232]

Answer:a detailed structured diagram or drawing.

Explanation:

5 0
3 years ago
Water is the working fluid in an ideal regenerative Rankine cycle with one open feedwater heater. Superheated vapor enters the f
Zepler [3.9K]

Answer:

a) The net powered developed will be 145715 KW.

b) The rate of Heat Transfer to the steam passing through the boiler will be 326340 KW.

c) The thermal efficiency will be 0.45.

d) The mass flow rate will be 884.09 kg/s.

Explanation:

8 0
3 years ago
Other questions:
  • You are watching the weather forecast and the weatherman says that strong thunderstorms and possible tornadoes are likely to for
    15·1 answer
  • Pls help me answer my module
    13·1 answer
  • Liquid water is fed to a boiler at 24°C and 10 bar is converted at a constant pressure to saturated steam.
    12·1 answer
  • Help now please evaluate using the commutative property: 40 (32) (10) (25)
    8·1 answer
  • What are the important things to remember when arriving for an interview?
    15·1 answer
  • Although many countries have issues with soil erosion due to deforestation, some of the most serious effects are seen
    8·1 answer
  • The fracture strength of glass may be increased by etching away a thin surface layer. It is believed that the etching may alter
    5·1 answer
  • Vector A extends from the origin to a point having polar coordinates (7, 70ᵒ ) and vector B extends from the origin to a point h
    9·1 answer
  • 2) The switch in the circuit below has been closed a long time. At t=0, it is opened.
    5·1 answer
  • Using the tables for water, determine the specified property data at the indicated states. In each case, locate the state on ske
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!