137k views
14 votes
Write multiple if statements:

If carYear is before 1967, put "Probably has few safety features.\\" to output.

If after 1970, put "Probably has head rests.\\" to output.

If after 1992, put "Probably has anti-lock brakes.\\" to output.

If after 2002, put "Probably has airbags.\\" to output.

Ex: If carYear is 1995, then output is:

Probably has head rests.
Probably has anti-lock brakes.

User Rajvijay
by
4.9k points

1 Answer

7 votes

Hope this is good enough! Good luck.

Write multiple if statements: If carYear is before 1967, put "Probably has few-example-1
User Sebastien Lorber
by
5.2k points