Answer :
Answer:
#include <iostream>
using namespace std;
int main() {
int carYear;
carYear = 1995;
if(carYear < 1968)
cout << "Probably has few safety features." << endl;
if(carYear > 1970)
cout << "Probably has head rests." << endl;
if(carYear > 1992)
cout << "Probably has anti-lock brakes." << endl;
if(carYear > 2000)
cout << "Probably has airbags." << endl;
return 0;
}
Explanation:
- Declare the carYear variable with int as data type.
- Initialize carYear with any value like 1995.
- Add an If statement for each case and then print the corresponding message.
Output:
Probably has anti-lock brakes.
Probably has airbags.