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
While recharging a refrigerant system, the charging stops before the required amount of refrigerant has been inserted. What shou
zaharov [31]

Answer:

Answer C

Explanation:

That is the correct way.

7 0
3 years ago
A cylindrical 1045 steel bar is subjected to repeated compression-tension stress cycling along its axis. If the load amplitude i
Gre4nikov [31]

Answer:

13.4 mm

Explanation:

Given data :

Load amplitude ( F )  = 22,000 N

factor of safety ( N )= 2.0

Take ( Fatigue limit stress amplitude for this alloy ) б = 310 MPa

<u>calculate the minimum allowable bar diameter to ensure that fatigue failure will not occur</u>

minimum allowable bar diameter = 13.4 * 10^-3 m ≈ 13.4 mm

<em>attached below is a detailed solution</em>

3 0
2 years ago
A strain gage is mounted at an angle of 30° with respect to the longitudinal axis of the cylindrical pressure. The pressure vess
GuDViN [60]

Answer:

1790 μrad.

Explanation:

Young's modulus, E is given as 10000 ksi,

μ is given as 0.33,

Inside diameter, d = 54 in,

Thickness, t = 1 in,

Pressure, p = 794 psi = 0.794 ksi

To determine shear strain, longitudinal strain and circumferential strain will be evaluated,

Longitudinal strain, eL = (pd/4tE)(1 - 2μ)

eL = (0.794 x 54)(1 - 0.66)/(4 x 1 x 10000)

eL = 3.64 x 10-⁴ radians

Circumferential strain , eH = (pd/4tE)(2-μ)

eH = (0.794 x 54)(2 - 0.33)/(4 x 1 x 10000)

eH = 1.79 x 10-³ radians

The maximum shear strain is 1790 μrad.

4 0
3 years ago
Determine the initial void ratio, the relative density and the unit weight (in pounds per cubic foot) of the specimens for each
Elina [12.6K]

The initial void ratio is the <em>parameter </em>which is used to show the structural foundations for each <em>specimen of sand </em>so that the method and speed of compression would be <em>measured</em>.

Relative density is the mass per unit volume of each specimen of sand which is <em>measured </em>and it has to do with the<em> relative ratio</em> of the density of the sand.

Unit weight is the the exact weight per cubic foot of the sand which is measured.

Please note that your question is incomplete so I gave you a general overview to help you better understand the concept

Read more here:

brainly.com/question/15220801

5 0
2 years ago
The pressure gage on a 2.5-m^3 oxygen tank reads 500 kPa. Determine the amount of oxygen in the tank if the temperature is 28°C
s2008m [1.1K]

Answer:

19063.6051 g

Explanation:

Pressure = Atmospheric pressure + Gauge Pressure

Atmospheric pressure = 97 kPa

Gauge pressure = 500 kPa

Total pressure = 500 + 97 kPa = 597 kPa

Also, P (kPa) = 1/101.325  P(atm)

Pressure = 5.89193 atm

Volume = 2.5 m³ = 2500 L ( As m³ = 1000 L)

Temperature = 28 °C

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

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

So,  

T₁ = (28.2 + 273.15) K = 301.15 K  

Using ideal gas equation as:

PV=nRT

where,  

P is the pressure

V is the volume

n is the number of moles

T is the temperature  

R is Gas constant having value = 0.0821 L.atm/K.mol

Applying the equation as:

5.89193 atm × 2500 L = n × 0.0821 L.atm/K.mol × 301.15 K  

⇒n = 595.76 moles

Molar mass of oxygen gas = 31.9988 g/mol

Mass = Moles * Molar mass = 595.76 * 31.9988 g = 19063.6051 g

7 0
3 years ago
Other questions:
  • In the combination of resistors above, consider the 1.50 µΩ and 0.75 µΩ. How can you classify the connection between these two r
    6·1 answer
  • Consider a vortex filament of strength in the shape of a closed circular loop of radius R. Obtain an expression for the velocity
    10·1 answer
  • A small family home in Tucson, Arizona has a rooftop area of 2667 square feet, and it is possible to capture rain falling on abo
    5·1 answer
  • Rolling and Shearing are the types of a)-Bulk Deformation Process b)- Sheet Metal Process c)- Machining Process d)- Both a &amp;
    7·1 answer
  • A heat pump and a refrigerator are operating between the same two thermal reservoirs. Which one has a higher COP?
    10·1 answer
  • (d) Suppose two students are memorizing a list according to the same model dL dt = 0.5(1 − L) where L represents the fraction of
    6·1 answer
  • Sam constructs a circuit, connects a lead acid battery of 2 V to a lamp of resistance 3 Ω and places an ammeter across it. What
    8·2 answers
  • Puan puan puan vericim
    5·2 answers
  • Your sprayer has a 60-foot wide boom with 36 nozzles along this 60-foot length. Your spray speed is 4.5 miles per hour and you w
    15·1 answer
  • I know this answer i just want too see if people know it too
    9·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!