answer.
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]
2 years ago
5

Write multiple if statements

Engineering
1 answer:
Tatiana [17]2 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
Initialize the tuple team_names with the strings 'Rockets', 'Raptors', 'Warriors', and 'Celtics' (The top-4 2018 NBA teams at th
Drupady [299]

Answer:

#Initialise a tuple

team_names = ('Rockets','Raptors','Warriors','Celtics')

print(team_names[0])

print(team_names[1])

print(team_names[2])

print(team_names[3])

Explanation:

The Python code illustrates or printed out the tuple team names at the end of a season.

The code displayed is a function that will display these teams as an output from the program.

4 0
2 years ago
A converging-diverging nozzle is designed to operate with an exit Mach number of 1.75 . The nozzle is supplied from an air reser
Flura [38]

Answer:

a. 4.279 MPa

b. 3.198 MPa to 4.279 MPa

c. 0.939 MPa

d. Below 3.198 MPa

Explanation:

From the given parameters

M_{exit} = 1.75 MPa  

M at 1.6 MPa gives A_{exit}/A* = 1.2502

M at 1.8 MPa gives  A_{exit}/A* = 1.4390

Therefore, by interpolation, we have M_{exit} = 1.75 MPa  gives A

However, we shall use M_{exit} = 1.75 MPa and A

Similarly,

P_{exit}/P₀ = 0.1878

a) Where the nozzle is choked at the throat there is subsonic flow in the following diverging part of the nozzle. From tables, we have

A_{exit}/A* = 1.387. by interpolation M

Therefore P_{exit} = P₀ × P

Which shows that the nozzle is choked for back pressures lower than 4.279 MPa

b) Where there is a normal shock at the exit of the nozzle, we have;

M₁ = 1.75 MPa, P₁ = 0.1878 × 5 = 0.939 MPa

Where the normal shock is at M₁ = 1.75 MPa, P₂/P₁ = 3.406

Where the normal shock occurs at the nozzle exit, we have

P_b = 3.406\times 0.939 = 3.198 MPa

Where the shock occurs t the section prior to the nozzle exit from the throat, the back pressure was derived as P_b = 4.279 MPa

Therefore the back pressure value ranges from 3.198 MPa to 4.279 MPa

c) At M_{exit} = 1.75 MPa  and P

d) Where the back pressure is less than 3.198 MPa according to isentropic flow relations supersonic flow will exist at the exit plane    

8 0
2 years ago
A six- lane freeway ( three lanes in each direction) in a scenic area has a measured free- flow speed of 55 mi/ h. The peak- hou
Novosadov [1.4K]

Answer:

0.867

Explanation:

The driver population factor (f_{p})can be estimated using the equation below:

f_{p} = \frac{V}{PHF*N*f_{HV}*v_{p}}

The value of the heavy vehicle factor (f_{HV}) is determined below:

The values of the E_{T} = 2 and E_{R} = 3 are gotten from the tables for the RVs, trucks and buses upgrades for passenger-car equivalents. Therefore:

f_{HV} = 1/[1+0.08(2-1)+0.06(3-1)] = 1/[1+0.08+0.12] = 1/1.2 = 0.833

Furthermore, the vp is taken as 2250 pc/(h*In) from the table of LOS criteria for lane freeway using the 15 minutes flow rate. Therefore:

f_{p} = 3900/[0.8*3*0.833*2250] = 3900/4498.2 = 0.867

6 0
2 years ago
For a p-n-p BJT with NE 7 NB 7 NC, show the dominant current components, with proper arrows, for directions in the normal active
Sonja [21]

Answer:

=> base transport factor = 0.98.

=> emitter injection efficiency = 0.99.

=> common-base current gain = 0.97.

=> common-emitter current gain = 32.34.

=> ICBO = 1 × 10^-6 A.

=> base transit time = 0.325.

=> lifetime = 1.875.

Explanation:

(Kindly check the attachment for the diagram showing the dominant current components, with proper arrows, for directions in the normal active mode).

The following parameters or data are given for a p-n-p BJT with NE 7 NB 7 NC and they are: IEp = 10 mA, IEn = 100 mA, ICp = 9.8 mA, and ICn = 1 mA.

(1). The base transport factor = ICp/IEp=9.8/10 =  0.98.

(2). emitter injection efficiency =IEp/ IEp + ICn = 10/10 + 0.1 =  0.99.

(3).common-base current gain = 0.98 × 0.99 = 0.9702.

(4).common-emitter current gain =0.97 / 1- 0.97  = 32.34.

(5). Icbo = Ico = 1 × 10^-6 A.

(6). base transit time = 1248 × 10^-2 × (1.38× 10^-23/1.603 × 10^-19). = 0.325.

(7).lifetime;

= > 2 = √0.325 + √ lifetime.

= Lifetime = 2.875.

6 0
2 years ago
A shopaholic has to buy a pair of jeans , a pair of shoes l,a skirt and a top with budgeted dollar.Given the quantity of each pr
fredd [130]

Answer:

you might be facing some difficulty in observing this point of division between your question and me

0 0
2 years ago
Other questions:
  • Oil with a density of 800 kg/m3 is pumped from a pressure of 0.6 bar to a pressure of 1.4 bar, and the outlet is 3 m above the i
    9·1 answer
  • (3) Calculate the heat flux through a sheet of brass 7.5 mm (0.30 in.) thick if the temperatures at the two faces are 150°Cand 5
    9·1 answer
  • The emissivity of galvanized steel sheet, a common roofing material, is ε = 0.13 at temperatures around 300 K, while its absorpt
    7·1 answer
  • Let Deterministic Quicksort be the non-randomized Quicksort which takes the first element as a pivot, using the partition routin
    13·1 answer
  • A thin-walled tube with a diameter of 6 mm and length of 20 m is used to carry exhaust gas from a smoke stack to the laboratory
    7·1 answer
  • Refrigerant-134a is compressed from 2 bar, saturated vapor, to 10 bar, 90o C in a compressor operating at steady state. The mass
    11·1 answer
  • Consider a steady developing laminar flow of water in a constant-diameter horizontal discharge pipe attached to a tank. The flui
    14·1 answer
  • Toeboards are usually ___ inches high and used on landings and balconies.
    8·1 answer
  • if the mine winch drum diameter is 6 m, calculate how far the cage will drop for each single rotation of the drum
    9·1 answer
  • NEEDS TO BE IN PYTHON:ISBN-13 is a new standard for indentifying books. It uses 13 digits d1d2d3d4d5d6d7d8d910d11d12d13 . The la
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!