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
Bas_tet [7]
3 years ago
5

Write multiple if statements

Engineering
1 answer:
Tatiana [17]3 years ago
3 0

Code:

#include <iostream>

using namespace std;

int main()

{

  int Car_Year;

  cout<<"Please Enter the Car Model."<<endl;

  cin>>Car_Year;    

 if (Car_Year<1967)

 {

cout<<"Few safety features."<<endl;

 }

else if (Car_Year>1971 && Car_Year<=1991)

{

cout<<"Probably has head rests."<<endl;

}

else if (Car_Year>1991 && Car_Year<=2000)

{

cout<<"Probably has antilock brakes."<<endl;

}

else if (Car_Year>2000)

{

cout<<"Probably has airbags."<<endl;

  }

else

{

cout<<"Invalid Selection."<<endl;

}

  return 0;

}

Output:

Please Enter the Car Model.

1975

Probably has head rests.

Please Enter the Car Model.

1999

Probably has antilock brakes.

Please Enter the Car Model.

2005

Probably has airbags.

Please Enter the Car Model.

1955

Few safety features.

Explanation:

We were required to implement multiple If else conditions to assign car model year with the corresponding features of the car.

The code is tested with a wide range of inputs and it returned the same results as it was asked in the question.

You might be interested in
Consider a steam turbine, with inflow at 500oC and 7.9 MPa. The machine has a total-to-static efficiency ofηts=0.91, and the pre
sergiy2304 [10]

Answer: \dot m_{in} = 23.942 \frac{kg}{s}, \dot H_{out} = 39632.62 kW

Explanation:

Since there is no information related to volume flow to and from turbine, let is assume that volume flow at inlet equals to \dot V = 1 \frac{m^{3}}{s}. Turbine is a steady-flow system modelled by using Principle of Mass Conservation and First Law of Thermodynamics:

Principle of Mass Conservation

\dot m_{in} - \dot m_{out} = 0

First Law of Thermodynamics

- \dot W_{out} + \eta\cdot (\dot m_{in} \dot h_{in} - \dot m_{out} \dot h_{out}) = 0

This 2 x 2 System can be reduced into one equation as follows:

-\dot W_{out} + \eta \cdot \dot m \cdot ( h_{in}- h_{out})=0

The water goes to the turbine as Superheated steam and goes out as saturated vapor or a liquid-vapor mix. Specific volume and specific enthalpy at inflow are required to determine specific enthalpy at outflow and mass flow rate, respectively. Property tables are a practical form to get information:

Inflow (Superheated Steam)

\nu_{in} = 0.041767 \frac{m^{3}}{kg} \\h_{in} = 3399.5 \frac{kJ}{kg}

The mass flow rate can be calculated by using this expression:

\dot m_{in} =\frac{\dot V_{in}}{\nu_{in}}

\dot m_{in} = 23.942 \frac{kg}{s}

Afterwards, the specific enthalpy at outflow is determined by isolating it from energy balance:

h_{out} =h_{in}-\frac{\dot W_{out}}{\eta \cdot \dot m}

h_{out} = 1655.36 \frac{kJ}{kg}

The enthalpy rate at outflow is:

\dot H_{out} = \dot m \cdot h_{out}

\dot H_{out} = 39632.62 kW

3 0
3 years ago
The flowrate through a rectangular channel is 20 cfs. The upstream width of the channel is 10 ft, and the depth of the water in
Liula [17]

To solve this problem we will use the Froude number that relates the Forces of Inertia with the Forces of Gravity. There will be jump in the downstream only if Froude Number (Fr) is greater than 1 at upstream. Our values are given as,

Q = 20cfs\\w= 10ft\\D= 1ft

Then the velocity would be:

V = \frac{Q}{wD}V = \frac{20}{10*1}V = 2ft/s

The number of Froude is given as,

Fr = \frac{V}{gD}^{1/2}

Where,

V = Velocity

g = Gravity

D = Diameter

Replacing we have that

Fr = \frac{2}{32.2}^{1/2}\\Fr = 0.352\\Fr

There will be no Jump, correct answer is B.

5 0
3 years ago
Thermal energy is...
Yuki888 [10]
B because thermal has to do with temperature and it’s the amount of kinetic and potential energy in and object
4 0
3 years ago
Read 2 more answers
Engineer Smith, who is licensed in several jurisdictions, recently had his license acted upon by a licensing authority in one of
Nimfa-mama [501]

Answer:

Assuming the infraction in the other jurisdiction is an infraction in Florida, having approximately the same penalty imposed by the FBPE as was imposed in the other jurisdiction

Explanation:

The idea of 8 hours continuation in the options is irrelevant to this case. Rather, Engineer Smith should expect about the same penalty imposition.

3 0
3 years ago
What is the importance of knowing the parts and function of the ignition system in servicing your own vehicle
lisov135 [29]

Answer:

El conocer la función del sistema nervioso permite comprender la estructura del cuerpo. Puesto que, toda acción que se se realice en ella dependerá del sistema nervioso para que sea eficaz

4 0
2 years ago
Other questions:
  • What mark appears on frames of industrial safety glasses?
    15·1 answer
  • Unlike in previous questions where we wanted you to complete a function we had started, here we want you to write a Python funct
    5·1 answer
  • You are reassembling a gearbox. The output
    9·1 answer
  • Sea water with a density of 1025 kg/m3 flows steadily through a pump at 0.21 m3 /s. The pump inlet is 0.25 m in diameter. At the
    8·1 answer
  • What sub-discipline of Mechanical Engineering focuses
    10·1 answer
  • Convert 850 nm wavelength into frequency, eV, wavenumber, joules and ergs.
    11·1 answer
  • Comparación de hipotecas Los Chos
    15·1 answer
  • Which of these methods is likely to make a product design more suitable for mass production?
    8·1 answer
  • Technician A says that much of the lighter GMAW welding work in a body shop can be done with a 115-volt welder. Technician B say
    14·1 answer
  • Not all projects that engineers work on will have human factors involved.
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!