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
A fluid at 300 K flows through a long, thin-walled pipe of 0.2-m diameter. The pipe is enclosed in a concrete casing that is of
andrew-mc [135]

Answer:

The correct answer is "1341.288 W/m".

Explanation:

Given that:

T₁ = 300 K

T₂ = 500 K

Diameter,

d = 0.2 m

Length,

l = 1 m

As we know,

The shape factor will be:

⇒ SF=\frac{2 \pi l}{ln[\frac{1.08 b }{d} ]}

By putting the value, we get

⇒       =\frac{2 \pi l}{ln[\frac{1.08\times 1}{0.2} ]}

⇒       =3.7258 \ l

hence,

The heat loss will be:

⇒ Q=SF\times K(T_2-T_1)

       =3.7258\times 1\times 1.8\times (500-300)

       =3.7258\times 1.8\times (200)

       =1341.288 \ W/m

3 0
3 years ago
If you add 10 J of heat to a system so that the final temperature of the system is 200K, what is the change in entropy of the sy
Elden [556K]

Answer:

0.05 J/K

Explanation:

Given data in question

heat (Q) = 10 J

temperature (T) = 200 K

to find out

the change in entropy of the system

Solution

we will solve this by the entropy change equation

i.e  ΔS = ΔQ/T           ...................1

put the value of heat Q and Temperature T in equation 1

ΔS is the enthalpy change and T is the temperature

so  ΔS = 10/200

ΔS = 0.05 J/K

8 0
3 years ago
A 150 MVA, 24 kV, 123% three-phase synchronous generator supplies a large network. The network voltage is 27 kV. The phase angle
Aleks04 [339]

Answer:

the generator induced voltage is 60.59 kV

Explanation:

Given:

S = 150 MVA

Vline = 24 kV = 24000 V

X_{s} =1.23(\frac{V_{line}^{2}  }{s} )=1.23\frac{24000^{2} }{1500} =4723.2 ohms

the network voltage phase is

V_{phase} =\frac{V_{nline} }{\sqrt{3} } =\frac{27}{\sqrt{3} } =15.58kV

the power transmitted is equal to:

|E|=\frac{P*X_{s} }{3*|V_{phase}|sinO } ;if-O=60\\|E|=\frac{300*4.723}{3*15.58*sin60} =34.98kV

the line induced voltage is

|E_{line} |=\sqrt{3} *|E|=\sqrt{3} *34.98=60.59kV

7 0
3 years ago
The corner store sells candy in ₵20, ₵30 and ₵50 packages. List all the ways in which the Candyman
Novosadov [1.4K]

Answer: I will list them down below!

Explanation:

He can buy 6, 50 cent candies.

He can buy 30, 20 cent candies.

He can buy 6, 30 cent candies and 6, 20 cent candies.

He can buy 15, 20 cent candies and 3, 50 cent candies.

He can by 3, 20 and 30 cent candies and 3, 50 cent candies.

That's it.

Hope this helps!

6 0
1 year ago
This is hard please help me you will give brainlist
Musya8 [376]
It spirals clockwise
5 0
3 years ago
Read 2 more answers
Other questions:
  • Water vapor at 6 MPa, 500°C enters a turbine operating at steady state and expands to 20 kPa. The mass flow rate is 3 kg/s, and
    8·1 answer
  • A stream of ethylene gas at 250°C and 3800 kPa expands isentropically in a turbine to 120 kPa. Determine the temperature of the
    5·1 answer
  • What's mutual inductance​
    8·1 answer
  • You are a designer of a new processor. You have to choose between two possible implementations (called M1 and M2) of the same ar
    5·1 answer
  • Water flows through a horizontal 60 mm diameter galvanized iron pipe at a rate of 0.02 m3/s. If the pressure drop is 135 kPa per
    9·1 answer
  • The driver _______
    9·2 answers
  • When must an Assured Equipment Grounding Conductor Program (AEGCP) be in place?
    10·1 answer
  • An incremental encoder is rotating at 15 rpm. On the wheel there are 40 holes. How many degrees of rotation would 1 pulse be?
    11·1 answer
  • A coil consists of 200 turns of copper wire and have a cross-sectional area of 0.8 mmm square.The mean length per turn is 80 cm
    13·1 answer
  • A motor takes 38 amperes on a 220-volt circuit. Find the horsepower output (hp) of the motor shown with an efficiency of 90%. Ex
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!