Question: Write multiple if statements: If carYear is before 1 9 6 7 , put Probably has few safety features. to output. If after 1

Write multiple if statements:
If carYear is before 1967, put "Probably has few safety features.
" to output.
If after 1970, put "Probably has seat belts.
" to output. integer carYear
// Program will be tested with: 1967,1970,1972,1991,1993,2001,2005.
carYear = Get next input
If after 1991, put "Probably has electronic stability control.
" to output.
If after 2001, put "Probably has airbags.
" to output.
Ex: If carYear is 1995, then output is:
Probably has seat belts. Probably has electronic stability control.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!