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
Nikolay [14]
3 years ago
14

Write the definition of a function printLarger, which has two int parameters and returns nothing. The function prints the larger

value of the two parameters to standard output on a single line by itself.
Engineering
1 answer:
vredina [299]3 years ago
7 0

Answer:

  1. #include <iostream>
  2. using namespace std;
  3. void printLarger(int a, int b){
  4.    
  5.    if(a > b){
  6.        cout<<a;
  7.    }else{
  8.        cout<<b;
  9.    }
  10. }
  11. int main()
  12. {
  13.    printLarger(4, 5);
  14.    return 0;
  15. }

Explanation:

The solution code is written in C++.

Firstly define a function printLarger that has two parameters, a and b with both of them are integer type (Line 5). In the function, create an if condition to check if a bigger than b, print a to terminal (Line 7-8). Otherwise print b (Line 9-10).

In the main program, test the function by passing 4 and 5 as arguments (Line 16) and we shall get 5 printed.  

You might be interested in
Q.17) A 50-acre catchment containing cropland is converted ot a Qatar mail
Ghella [55]

Answer:

Option D

Explanation:

A post development hydrograph will have lower concentration time and lower infiltration losses and hence sooner peak and higher peak and more runoff or higher area under graph. Therefore, all the answers are correct hence option D

3 0
2 years ago
If you get a flat in the front of your car, your car will:
juin [17]

Answer:

stop and might even crash

Explanation:

6 0
2 years ago
A small pad subjected to a shearing force is deformed at the top of the pad 0.08 in. The height of the pad is 1.38 in. What is t
Aleksandr-060686 [28]

Answer:

The shear strain is 0.05797 rad.

Explanation:

Shear strain is the ratio of change in dimension along the shearing load direction to the height of the plate under application of shear load. Width of the plate remains same. Length of the plate slides under shear load.

Step1

Given:

Height of the pad is 1.38 in.

Deformation at the top of the pad is 0.08 in.

Calculation:

Step2

Shear strain is calculated as follows:

tan\phi=\frac{\bigtriangleup l}{h}

tan\phi=\frac{0.08}{1.38}

tan\phi= 0.05797

For small angle of \phi, tan\phi can take as\phi.

\phi = 0.05797 rad.

Thus, the shear strain is 0.05797 rad.

7 0
3 years ago
The temperature of a system rises by 10 °C during a heating process. Express the rise in temperature of K, R, and °F.
Lorico [155]

Explanation:

Given T = 10 °C

The conversion of T( °C) to T(K) is shown below:

T(K) = T( °C) + 273.15  

So,  

T = (10 + 273.15) K = 283.15 K

<u>T = 283.15 K </u>

The conversion of T( °C) to T(F) is shown below:

T (°F) = (T (°C) × 9/5) + 32  

So,

T (°F) = (10 × 9/5) + 32 = 50 °F

<u>T = 50 °F</u>

The conversion of T( °C) to T(R) is shown below:

T (R) = (T (°C) × 9/5) + 491.67

So,

T (R) = (10 × 9/5) + 491.67 = 509.67 R

<u>T = 509.67 R</u>

6 0
3 years ago
A second inventor was driving down the highway in her Prius one day with her hand out the window. She happened to be driving thr
Eva8 [605]

Answer:

Explanation:

It wouldn't work because the wind energy she would be collecting would actually come from the car engine.

The relative wind velocity observed from a moving vehicle is the sum of the actual wind velocity and the velovity of the vehicle.

u' = u + v

While running a car will generate a rather high wind velocity, and increase the power generated by a wind turbine, the turbine would only be able to convert part of the wind energy into electricity while adding a lot of drag. In the end, it would generate less energy that what the drag casuses the car to waste to move the turbine.

Regenerative braking uses an electric generator connected to the wheel axle to recover part of the kinetic energy eliminated when one brakes the vehicle. Normal brakes dissipate this energy as heat, a regenerative brake uses it to recharge a batttery. Note that is is a fraction of the energy that is recovered, not all of it.

A "regenerative accelerator" makes no sense. Braking is taking kinetic energy out of the vehicle, while accelerating is adding kinetic energy to it. Cars accelerate using the power from their engines.

6 0
3 years ago
Other questions:
  • A 2.599 g sample of a new organic material is combusted in a bomb calorimeter. The temperature of the calorimeter and its conten
    13·1 answer
  • Define the difference between elastic and plastic deformation in terms of the effect on the crystal lattice structure.
    5·1 answer
  • Write a method called compFloat5 which accepts as input two doubles as an argument (parameter). Write the appropriate code to te
    9·1 answer
  • Which of the following answers regarding Mealy and Moore Machines are true?
    7·1 answer
  • Help me is it a b c or d?
    14·1 answer
  • The section should span between 10.9 and 13.4 cm (4.30 and 5.30 inches) as measured from the end supports and should be able to
    5·1 answer
  • A remote village on an island was devastated by a typhoon. Farmland was flooded and the crops
    9·1 answer
  • Component of earthing and reasons why each material is being used<br><br>​
    5·1 answer
  • Why is personal development necessary based activity success life and career​
    11·1 answer
  • The A/C compressor will not engage when the A/C is turned on. The static refrigerant pressure is 75 psi and the outside temperat
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!