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
shepuryov [24]
3 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]3 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
Briefly explain why small-angle grain boundaries are not as effective in interfering with the slip process as are high-angle gra
Vlada [557]

Answer:

Explanation:

Small-angle grain boundaries are not as effective in interfering with the slip process as are high-angle grain boundaries because there is not as much crystallographic misalignment in the grain boundary region for small-angle, and therefore not as much change in slip direction.

Low angle grain boundaries (quasi-coherent) are formed by the dislocation network positioned along the geometric plane with small tilt angle differences between successive peers that is tilt boundary made up edge dislocations therefore it may only divert the slip direction of the incoming gliding dislocation with very little frictional stresses. And on the other hand, a high angle grain boundary region because of their disordered almost liquid like structure which acts as a strong barrier against dislocation slip motion and causes actually formation of dislocations file-up against it by arresting their motion unless that the stress concentration at the leading dislocation becomes high enough to go though the barrier.

5 0
3 years ago
A heat recovery device involves transferring energy from the hot flue gases passing through an annular region to pressurized wat
Elina [12.6K]

Answer:

See explaination

Explanation:

Please kindly check attachment for the step by step solution of the given problem.

4 0
3 years ago
Source water pollution in Madagascar
vodka [1.7K]

Answer:

What is the question?

Explanation:

7 0
2 years ago
EMB agar is a medium used in the identification and isolation of pathogenic bacteria. It contains digested meat proteins as a so
Ilya [14]

Answer:

A selective medium, a differential medium, and a complex medium.

Explanation:

A selective media is a microbiological media which only support the growth of a particular specie or types of species of microorganisms,this media acts in such a way to inhibit or hinder the growth of other microorganisms.

Differential media are media that acts to Identifying particular strains of microorganisms of similar species.

Complex media are media used for the growth of microorganisms this which contains complex or a wide range of nutrients with chemical composition which may be difficult to determine.

5 0
3 years ago
Write the following decorators and apply them to a single function (applying multiple decorators to a single function): 1. The f
natita [175]

Answer:

Complete question is:

write the following decorators and apply them to a single function (applying multiple decorators to a single function):

1. The first decorator is called strong and has an inner function called wrapper. The purpose of this decorator is to add the html tags of <strong> and </strong> to the argument of the decorator. The return value of the wrapper should look like: return “<strong>” + func() + “</strong>”

2. The decorator will return the wrapper per usual.

3. The second decorator is called emphasis and has an inner function called wrapper. The purpose of this decorator is to add the html tags of <em> and </em> to the argument of the decorator similar to step 1. The return value of the wrapper should look like: return “<em>” + func() + “</em>.

4. Use the greetings() function in problem 1 as the decorated function that simply prints “Hello”.

5. Apply both decorators (by @ operator to greetings()).

6. Invoke the greetings() function and capture the result.

Code :

def strong_decorator(func):

def func_wrapper(name):

return "<strong>{0}</strong>".format(func(name))

return func_wrapper

def em_decorator(func):

def func_wrapper(name):

return "<em>{0}</em>".format(func(name))

return func_wrapper

@strong_decorator

@em_decorator

def Greetings(name):

return "{0}".format(name)

print(Greetings("Hello"))

Explanation:

5 0
3 years ago
Other questions:
  • A bar of steel has the minimum properties Se = 40 kpsi, Sy = 60 kpsi, and Sut = 80 kpsi. The bar is subjected to a steady torsio
    7·1 answer
  • Compare automation and autonomous
    12·1 answer
  • A evolução da malha rodoviária do Brasil é um marco notável
    9·1 answer
  • Question 5
    7·2 answers
  • Before you calculate the moment capacity for a steel beam, you have to determine the classification of beam.
    10·1 answer
  • Consider a section of muscle tissue of a cylindrical shape with a radius of 1.5 cm. During highly rigorous exercise, metabolic p
    8·1 answer
  • The current at resonance in a series L-C-R circuit is 0.2mA. If the applied voltage is 250mV at a frequency of 100 kHz and the c
    9·1 answer
  • Plz help If an item is $13.00 for a case of 24, then it is $
    11·2 answers
  • Explain race condition..<br><br>don't spam..​
    13·2 answers
  • 10. What refrigerant is no longer manufactured in the<br> United States?
    5·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!