Question

Reset Write multiple if statements: If carYear is before 1968, print Probably has few safety features (without quotes). If after 1969, print Probably has head rests. If after 1992, print Probably has electronic stability control. If after 2001, print Prodably has tire- pressure monitor End each phrase with period and newline. Ex carYear 1995 prints Probably has head rests. Probably has electronic stability control. sinclude ciostream 2 using nanespace std int main) 7 carYear 1979 9Your solution goes here/ s int caryear 10 11 return
0 0
Add a comment Improve this question Transcribed image text
Answer #1

Raw Copyable Code:

//Include the files

#include <iostream>

//Use namespace

using namespace std;

//Define main

int main()

{

     //Declare variable

     int carYear;

     //Set value

     carYear = 1970;

     //Check condition

     if(carYear<1968)

     {

          //Print message

          cout<<"Probably has few safety features.\n";

     }

     //Check condition

     if(carYear >1969)

          //Print message

          cout<<"Probably has head rests.\n";

     //Check condition

     if(carYear>1992)

          //Print message

          cout<<"Probably has electronic stability control.\n";

     //Check condition

     if(carYear > 2001)

          //Print message

          cout<<"Probably has tire-pressure monitor.\n";

     //Pause window

     system("pause");

     //Stop program

     return 0;

}

Add a comment
Know the answer?
Add Answer to:
Reset Write multiple if statements: If carYear is before 1968, print 'Probably has few safety features'...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Write multiple if statements: If carYear is before 1967, print "Probably has few safety features." (without...

    Write multiple if statements: If carYear is before 1967, print "Probably has few safety features." (without quotes). If after 1970, print "Probably has seat belts.". If after 1990, print "Probably has electronic stability control.". If after 2002, print "Probably has airbags.". End each phrase with period and newline. Ex: carYear = 1995 prints: Probably has seat belts. Probably has electronic stability control. the answer: #include <iostream> using namespace std; int main() { int carYear; carYear = 2001; /* Your solution...

  • CHALLENGE ACTIVITY 3.3.4: Multiple if statements: Print car info. Write multiple if statements. If carYear is...

    CHALLENGE ACTIVITY 3.3.4: Multiple if statements: Print car info. Write multiple if statements. If carYear is 1969 or earlier, print "Probably has few safety features." If 1970 or higher, print "Probably has seat belts." If 1990 or higher, print "Probably has anti-lock brakes." If 2000 or higher, print "Probably has air bags." End each phrase with period and newline. Ex: carYear = 1995 prints: Probably has seat belts. Probably has anti-lock brakes. import java.util.Scanner; public class CarFeatures { public static...

  • Write MySQL query statements for the questions below including the output that proves the accuracy of...

    Write MySQL query statements for the questions below including the output that proves the accuracy of your solution. Your answers should be stored in a text file that captures your interaction with MySQL. 1. Find the movieID, title, year and DVDPrice of all movies where the DVD-Price is equal to the discountPrice. 2. Find the actorID, lastName, firstName, middleName, and suffix of all actors whose middleName is not NULL. 3. Suppose you remember a movie quote as “Play it again,...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT