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
The electron beam in a TV picture tube carries 1015 electrons per second. As a design engineer, determine the voltage needed to
leonid [27]

Answer:

The voltage needed to accelerate the electron beam is 2.46 x 10^16 Volts

Explanation:

The rate of electron flow is given as:

q = 1015 electrons per second

The total current is given by:

Total Current = (Rate of electron flow)(Charge on one electron)

Total Current = I = (1015 electrons/s)(1.6 x 10^-19 C/electron)

I = 1.624 x 10^-16 A

Now, we know that electric power is given as:

Electric Power = Current x Voltage

P = IV

V = P/I

V = 4 W/1.624 X 10^-16 A

<u>V = 2.46 x 10^16 Volts</u>

6 0
3 years ago
The most important rating for batteries is the what
kifflom [539]

Answer:

I'm completely sure that the answer is: The most important rating for batteries is the ampere-hour rating. Ampere-hour is the battery discharge rating. It's used as a measure of charge in your device. It indicates how long your device will work without charging.

Explanation:

Hope this helped!

7 0
2 years ago
If the rotational speed of a pump motor is reduced by 35%, what is the effect on the pump performance in terms of capacity, head
FinnZ [79.3K]

Answer:

- the capacity of the pump reduces by 35%.

- the head gets reduced by 57%.

the power consumption by the pump is reduced by 72%

Explanation:

the pump capacity is related to the speed as speed is reduces by 35%

so new speed is (100 - 35) = 65% of orginal speed

speed Q ∝ N ⇒ Q1/Q2 = N1/N2

Q2 = (N2/N1)Q1    

Q2 = (65/100)Q1

which means that the capacity of the pump is also reduces by 35%.

the head in a pump is related by

H ∝ N² ⇒ H1/H2 = N1²/N2²

H2 = (N2N1)²H1

H2 = (65/100)²H1 = 0.4225H1

so the head gets reduced by 1 - 0.4225 = 0.5775 which is 57%.

Now The power requirement of a pump is related as

P ∝ N³ ⇒ P1/P2 = N1³/N2³

P2 = (N2/N1)³P1

H2 = (65/100)²P1 = 0.274P1

So the reduction in power is 1 - 0.274 = 0.725 which is 72%

Therefore for a reduction of 35% of speed there is a reduction of 72% of the power consumption by the pump.  

8 0
2 years ago
Can you help me with this
Fiesta28 [93]

the function is to provide sealed combustion so that the loss of gas is minimized

6 0
1 year ago
Two substances, A and B, initially at different temperatures, come into contact and reach thermal equilibrium. The mass of subst
Kaylis [27]

Answer:

The specific heat capacity of substance A is 1.16 J/g

Explanation:

The substances A and B come to a thermal equilibrium, therefore, the heat given by the hotter substance B is absorbed by the colder substance A.

The equation becomes:

Heat release by Substance B = Heat Gained by Substance A

The heat can be calculated by the formula:

Heat = mCΔT

where,

m = mass of substance

C = specific heat capacity of substance

ΔT = difference in temperature of substance

Therefore, the equation becomes:

(mCΔT) of A = (mCΔT) of B

<u>FOR SUBSTANCE A:</u>

m = 6.01 g

ΔT = Final Temperature - Initial Temperature

ΔT = 46.1°C - 20°C = 26.1°C

C = ?

<u>FOR SUBSTANCE B:</u>

m = 25.6 g

ΔT = Initial Temperature - Final Temperature

ΔT = 52.2°C - 46.1°C = 6.1°C

C = 1.17 J/g

Therefore, eqn becomes:

(6.01 g)(C)(26.1°C) = (25.6 g)(1.17 J/g)(6.1°C)

C = (182.7072 J °C)/(156.861 g °C)

<u>C = 1.16 J/g</u>

5 0
3 years ago
Other questions:
  • A flocculation basin equipped with revolving paddles is 60 ft long (the direction of flow). 45 ft wide, and 14 ft deep and treat
    11·1 answer
  • What is the linear distance traveled in one revolution of a 36-inch wheel
    6·1 answer
  • Number the statements listed below in the order that they would occur in engine operation. Then, label these stages as intake, c
    14·1 answer
  • A structural component in the form of a wide plate is to be fabricated from a steel alloy that has a plane-strain fracture tough
    10·1 answer
  • Can someone Please help me..? If I'm your Onii-San then answer. And get brainliest. Make sure to explain why..
    15·1 answer
  • The best way to become a better reader is to study longer and harder in every subject. engage in a variety of extracurricular ac
    5·2 answers
  • A tiger cub has a pattern of stripes on it for that is similar to that of his parents where are the instructions stored that pro
    8·1 answer
  • HOLA COMO ESTAN TODOS
    14·1 answer
  • GOOD AFTERNOON GUYSS!! ​
    15·2 answers
  • Write down the three formula to find the three types of slope of curve Q with respect to L.
    5·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!