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
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
Hatshy [7]

Answer:

The answer is "Option A".

Explanation:

Series:

9, 94, 916, 964, 9256, ........

Solving the above series:

\to  9\\ \to  9(4) =94\\\to 9 (4^2) = 9(16) =916\\\to 9 (4^3) = 9(64) =964\\\to 9 (4^4) = 9(256) =9256\\\to 9 (4^5) = 9(1024) =91024\\\to 9 (4^6) = 9(4096) =94096\\

So, the series is:  9, 94, 916, 964, 9256, 91024, 94096, .................

6 0
3 years ago
In the fully developed region of flow in a circular pipe, does the velocity profile change in the flow direction?
taurus [48]

Answer:

<em>No, the velocity profile does not change in the flow direction.</em>

Explanation:

In a fluid flow in a circular pipe, the boundary layer thickness increases in the direction of flow, until it reaches the center of the pipe, and fill the whole pipe. If the density, and other properties of the fluid does not change either by heating or cooling of the pipe, <em>then the velocity profile downstream becomes fully developed, and constant, and does not change in the direction of flow.</em>

3 0
3 years ago
An iron-carbon alloy initially containing 0.286 wt% C is exposed to an oxygen-rich and virtually carbon-free atmosphere at 1200°
Fantom [35]

Answer:

Explanation:

Given data:

initial construction co = 0.286 wt %

concentration at surface position cs = 0 wt %

carbon concentration cx = 0.215 wt%

time = 7 hr

D =  7.5 \times 10^{-11} m^2/s

for 0.225% carbon concentration following formula is used

\frac{cx -co}{cs -co} = 1 - erf(\frac{x}{2\sqrt{DT}})

where, erf stand for error function

\frac{cx -co}{cs -co} = \frac{0.215 -0.286}{0 -0.286} =0.248

0.248 = 1 - erf(\frac{x}{2\sqrt{DT}})

erf(\frac{x}{2\sqrt{DT}}) = 1 - 0.248

erf(\frac{x}{2\sqrt{DT}}) = 0.751

from the table erf(Z) value = 0.751 lie between (z) = 0.80 and z = 0.85 so by inteerpolation we have z = 0.815

from given table

\frac{x}{2\sqrt{DT}} = 0.815

x = 2\times 0.815 \times \sqrt{7.5 \times 10^{-11}\times (7\times 3600)

x = 2.39\times 10^{-3} m

x = 0.002395 mm

8 0
3 years ago
Can be used to eliminate rubbing friction of wheel touching frame. 1.Traction 2.Thrust washer
Vilka [71]

Answer:

thrust washer

can be used to eliminate rubbing friction of wheel touching frame

5 0
3 years ago
What different tests did the team perform to come up with a workable design?
I am Lyosha [343]
They ran different shapes and materials through a wind tunnel to see which shape and material would decrease energy output so that it takes in equal COthan it puts out.
5 0
4 years ago
Other questions:
  • 7. Which power source is an important transition between
    7·1 answer
  • Discuss four (4) advantages of direct and indirect water supply system.
    5·2 answers
  • The market for college textbooks is illustrated in the graph below. In the market for textbooks, the current price of a textbook
    11·1 answer
  • The average human heart Beats 1.15 times 10 to the power of 5 per day. There are 3.65 times 10 to the power of 2 days in one yea
    14·1 answer
  • Two loads connected in parallel draw a total of 2.4 kW at 0.8 pf lagging from a 120-V rms, 60-Hz line. One load absorbs 1.5 kW a
    5·1 answer
  • If Fred has already measured 14 inches of a table measuring 30 inches. How many inches does he need to measure more?
    15·1 answer
  • Pls help me with these 3 ez questions.
    8·2 answers
  • The production of carbon dioxide makes it unwise and unsafe to operate a tractor or any motor vehicle inside enclosed spaces suc
    13·1 answer
  • In the following scenario, what could the engineers have done to keep the bridge from collapsing?
    8·1 answer
  • If the 2007 recession affected the green building materials market less seriously than other parts of the construction market, t
    12·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!