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
shepuryov [24]
2 years ago
12

Write multiple if statements. If car_year is 1969 or earlier, print "Few safety features." If 1970 or later, print "Probably has

seat belts." If 1990 or later, print "Probably has antilock brakes." If 2000 or later, print "Probably has airbags." End each phrase with a period and a newline. Sample output for input: 1995
Engineering
1 answer:
Slav-nsk [51]2 years ago
5 0

Answer:

Explanation along with code and output results is provided below.

C++ Code:

#include <iostream>

using namespace std;

int main()

{

   int year;

   cout<<"Enter the car model year."<<endl;

   cin>>year;    

  if (year<=1969)

  {

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

  }

else if (year>=1970 && year<1989)

{

cout<<"Probably has seat belts."<<endl;

}

else if (year>=1990 && year<1999)

{

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

}

else if (year>=2000)

{

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

   }

   return 0;

}

Explanation:

The problem was to print feature messages of a car given its model year.

If else conditions are being used incorporate the logic. The code has been tested with several inputs and got correct output results.

Output:

Enter the car model year.

1961

Few safety features.

Enter the car model year.

1975

Probably has seat belts.

Enter the car model year.

1994

Probably has antilock brakes.

Enter the car model year.

2005

Probably has airbags.

You might be interested in
A cylindrical drum (2 ft. dia ,3 ft height) is filled with a fluid whose density is 40 lb/ft^3. Determine (a. the total volume o
Ksivusya [100]

Answer:

a)V=9.42\ ft^3

b)Mass in lb = 376.8 lb

Mass in slug = 11.71 slug

c)v=0.025\ ft^3/lb

d)w=1276 \ lb/ft.s^2

Explanation:

Given that

d= 2 ft

r= 1 ft

h= 3 ft

Density

\rho = 40\ lb/ft^3

a)

We know that volume V given as

V=\pi r^2 h

V=\pi \times 1^2\times 3

V=9.42\ ft^3

b)

Mass = Density x volume

mass =40\times 9.42\ lb

mass= 376.8 lb

We know that

1 lb = 0.031 slug

So 376.8 lb= 11.71 slug

Mass in lb = 376.8 lb

Mass in slug = 11.71 slug

c)

we know that specific volume(v) is the inverse of density.

v=\dfrac{1}{\rho}\ ft^3/lb

v=\dfrac{1}{40}\ ft^3/lb

v=0.025\ ft^3/lb

d)

Specific weight(w) is the product of density and the gravity(g).

w= ρ X g

w = 40 x 31.9

w=1276 \ lb/ft.s^2

8 0
2 years ago
A 50-kg iron block and 20-kg copper block, both initially at 80 oC, are dropped into a large lake at 15 oC. Thermal equilibrium
bija089 [108]
I need this answer to please
5 0
2 years ago
A thermal energy storage unit consists of a large rectangular channel, which is well insulated on its outer surface and encloses
yaroslaw [1]

Answer:

the temperature of the aluminum at this time is 456.25° C

Explanation:

Given that:

width w of the aluminium slab = 0.05 m

the initial temperature T_1 = 25° C

T{\infty} =600^0C

h = 100 W/m²

The properties of Aluminium at temperature of 600° C by considering the conditions for which the storage unit is charged; we have ;

density ρ = 2702 kg/m³

thermal conductivity k = 231 W/m.K

Specific heat c = 1033 J/Kg.K

Let's first find the Biot Number Bi which can be expressed by the equation:

Bi = \dfrac{hL_c}{k} \\ \\ Bi = \dfrac{h \dfrac{w}{2}}{k}

Bi = \dfrac{hL_c}{k} \\ \\ Bi = \dfrac{100 \times \dfrac{0.05}{2}}{231}

Bi = \dfrac{2.5}{231}

Bi = 0.0108

The time constant value \tau_t is :

\tau_t = \dfrac{pL_cc}{h} \\ \\ \tau_t = \dfrac{p \dfrac{w}{2}c}{h}

\tau_t = \dfrac{2702* \dfrac{0.05}{2}*1033}{100}

\tau_t = \dfrac{2702* 0.025*1033}{100}

\tau_t = 697.79

Considering Lumped capacitance analysis since value for Bi is less than 1

Then;

Q= (pVc)\theta_1 [1-e^{\dfrac {-t}{ \tau_1}}]

where;

Q = -\Delta E _{st} which correlates with the change in the internal energy of the solid.

So;

Q= (pVc)\theta_1 [1-e^{\dfrac {-t}{ \tau_1}}]= -\Delta E _{st}

The maximum value for the change in the internal energy of the solid  is :

(pVc)\theta_1 = -\Delta E _{st}max

By equating the two previous equation together ; we have:

\dfrac{-\Delta E _{st}}{\Delta E _{st}{max}}= \dfrac{  (pVc)\theta_1 [1-e^{\dfrac {-t}{ \tau_1}}]} { (pVc)\theta_1}

Similarly; we need to understand that the ratio of the energy storage to the maximum possible energy storage = 0.75

Thus;

0.75=  [1-e^{\dfrac {-t}{ \tau_1}}]}

So;

0.75=  [1-e^{\dfrac {-t}{ 697.79}}]}

1-0.75=  [e^{\dfrac {-t}{ 697.79}}]}

0.25 =  e^{\dfrac {-t}{ 697.79}}

In(0.25) =  {\dfrac {-t}{ 697.79}}

-1.386294361= \dfrac{-t}{697.79}

t = 1.386294361 × 697.79

t = 967.34 s

Finally; the temperature of Aluminium is determined as follows;

\dfrac{T - T _{\infty}}{T_1-T_{\infty}}= e ^ {\dfrac{-t}{\tau_t}}

\dfrac{T - 600}{25-600}= e ^ {\dfrac{-967.34}{697.79}

\dfrac{T - 600}{25-600}= 0.25

\dfrac{T - 600}{-575}= 0.25

T - 600 = -575 × 0.25

T - 600 = -143.75

T = -143.75 + 600

T = 456.25° C

Hence; the temperature of the aluminum at this time is 456.25° C

3 0
2 years ago
Twenty distinct cars park in the same parking lot every day. Ten of these cars are US-made, while the other ten are foreign-made
Zina [86]

Answer:

Total no. of ways to line up cars is 20! = 2.43 c 10^18

Probability that the cars alternate is 0.00001 or 0.001%

Explanation:

Since, the position of a car is random.Therefore, number ways in which cars can line up is given as:

<u>No. of ways = 20! = 2.43 x 10^18</u>

For the probability that cars alternate, two groups will be formed, one consisting of US-made 10 cars and other containing 10 foreign made. The number of favorable outcomes for this can be found out as the arrangements of 2! between these groups multiplied by the arrangements of 10! for each group, due to the arrangements among the groups themselves.

Favorable Outcomes = 2! x 10! x 10!

Thus the probability of event will be:

Probability = Favorable Outcomes/Total No. of Ways

Probability = (2! x 10! x 10!)/20!

<u>Probability = 0.00001 = 0.001%</u>

4 0
2 years ago
Liquid oxygen is stored in a thin-walled, spherical container 0.75 m in diameter, which is enclosed within a second thin-walled,
nadezda [96]

Answer:

Explanation:

the solution is well stated

3 0
2 years ago
Other questions:
  • What is the damped natural frequency (in rad/s) of a second order system whose undamped natural frequency is 25 rad/s and has a
    15·1 answer
  • A square loop of wire surrounds a solenoid. The side of the square is 0.1 m, while the radius of the solenoid is 0.025 m. The sq
    6·1 answer
  • Which of the following is correct regarding the principal stresses and maximum in-plane shear stresses? a. Principal stresses ca
    14·1 answer
  • Technician A says that the most efficient method of EVAP system leak detection is introducing smoke under low pressure from a ma
    7·1 answer
  • Q10. Select the correct option for the following questions – (10 points, 2 each) a. After an edge dislocation has passed through
    15·1 answer
  • Which requirement is an appropriate reason for a business to use information technology (IT) tools
    9·1 answer
  • Consider the time domain waveforms below on the left. Match waveforms (a) - (e) to their respective frequency spectrum represent
    11·1 answer
  • The BARO sensor informs the PCM about changes in weather and ____________________.
    14·1 answer
  • A fuel oil is burned with air in a furnace. The combustion produces 813 kW of thermal energy, of which 65% is transferred as hea
    13·1 answer
  • How does Accenture generate value for clients through Agile and DevOps?
    15·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!