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
A horizontal curve on a two-lane road is designed with a 2,300-ft radius, 12-ft lanes, and a 65-mph design speed. Determine the
Ierofanga [76]

Answer:

distance = 22.57 ft

superelevation rate = 2%

Explanation:

given data

radius = 2,300-ft

lanes width = 12-ft

no of lane = 2

design speed = 65-mph

solution

we get here sufficient sight distance SSD that is express as

SSD = 1.47 ut + \frac{u^2}{30(\frac{a}{g}\pm G)}     ..............1

here u is speed and t is reaction time i.e 2.5 second and a is here deceleration rate i.e 11.2 ft/s² and g is gravitational force i.e 32.2 ft/s² and G is gradient i.e 0 here

so put here value and we get

SSD = 1.47 × 65 ×2.5  + \frac{65^2}{30(\frac{11.2}{32.2}\pm 0)}

solve it we get

SSD = 644 ft  

so here minimum distance clear from the inside edge of the inside lane is

Ms = Rv ( 1  - cos (\frac{28.65 SSD}{Rv}) )        .....................2

here Rv is = R - one lane width

Rv = 2300 - 6 = 2294 ft

put value in equation 2 we get

Ms = 2294 ( 1  - cos (\frac{28.65 \times 664}{2294})  )  

solve it we get

Ms = 22.57 ft

and

superelevation rate for the curve will be here as

R  = \frac{u^2}{15(e+f)}  ..................3

here f is coefficient of friction that is 0.10

put here value and we get e

2300 = \frac{65^2}{15(e+0.10)}

solve it we get

e = 2%

3 0
3 years ago
An inventor claims to have invented a heat engine that operates between the temperatures of 627°C and 27°C with a thermal effici
Oksana_A [137]

Answer Explanation:

the efficiency of the the engine is given by=1-\frac{T_2}{T_1}

where T₂= lower temperature

           T₁= Higher temperature

we have given efficiency =70%

lower temperature T₂=27°C=273+27=300K

higher temperature T₁=627°C=273+627=900K

efficiency=1-\frac{T_2}{T_1}

                =1-\frac{300}{900}

                 =1-0.3333

                 =0.6666

                 =66%

66% is less than 70% so so inventor claim is wrong

3 0
3 years ago
What impact does modulus elasticity have on the structural behavior of a mechanical design?
devlian [24]

Answer with Explanation:

The modulus of elasticity has an profound effect on the mechanical design of any machine part as explained below:

1) Effect on the stiffness of the member: The ability of any member of a machine to resist any force depends on the stiffness of the member. For a member with large modulus of elasticity the stiffness is more and hence in cases when the member has to resist a direct load the member with more modulus of elasticity resists the force better.

2)Effect on the deflection of the member: The deflection caused by a force in a member is inversely proportional to the modulus of elasticity of the member thus in machine parts in which we need to resist the deflections caused by the load we can use materials with greater modulus of elasticity.

3) Effect to resistance of shear and torque: Modulus of rigidity of a material is found to be larger if the modulus of elasticity of the material is more hence for a material with larger modulus of elasticity  the resistance it offer's to shear forces and the torques is more.

While designing a machine element since the above factors are important to consider thus we conclude that modulus of elasticity has a profound impact on machine design.

8 0
3 years ago
A sensor produces a signal with amplitude 15 mV. A voltage amplifier must amplify the signal such that the amplitude of the outp
Nady [450]

Answer:

42.50 dB

Explanation:

Determine the minimum voltage gain

amplitude of input signal ( Vi ) = 15 mV

amplitude of output signal ( Vo) = 2 V

Vo = 2 v

therefore ; minimum gain = Vo / Vi =  2 / ( 15 * 10^-3 )

                                                         = 133.33

Minimum gain in DB = 20 log ( 133.33 )

                                  = 42.498 ≈ 42.50 dB

8 0
2 years ago
Which of the following would not be considered hot work? A chipping B soldering C
tankabanditka [31]
I believe the answer is D: brazing
Hope this helps you have a good night
5 0
2 years ago
Other questions:
  • To cool a summer home without using a vapor compression refrigeration cycle, air is routed through a plastic pipe (k=0.15 W/m*K,
    15·1 answer
  • given the classes above, what output is produced by the following code? meg[] elements ={new Lois(), new Stewie(), new Meg(), ne
    15·1 answer
  • Design a posttest-only experiment that would test each of the following causal claims. For each one, identify the study’s indepe
    13·1 answer
  • 2- A 2-m3 insulated tank containing ammonia at -20 C, 80% quality, is connected by a valve to a line flowing ammonia at 2 MPa, 6
    14·1 answer
  • An inventor tries to sell you his new heat engine that takes in 40 J of heat at 87°C on each cycle, expels 30 J at 27°C, and doe
    14·1 answer
  • A 100-mm-diameter cast Iron shaft is acted upon by a 10 kN.m bending moment, a 8 kN.m torque, and a 150 kN axial force simultane
    9·1 answer
  • It is the tool used to measure the amount of electric current​
    6·2 answers
  • Diffrerentiate y=cos^{4} (3x+1)
    5·1 answer
  • Based on the pattern, what are the next two terms of the sequence? 9,94,916,964,9256,... A. 91024,94096 B. 9260,91028 C. 9260,92
    5·1 answer
  • A jointed arm robot can rotate on the following 6 axes?
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!