Answer:
Following is the statement in the C language :
if(carYear < 1968)
printf("\nProbably has a few safety features.\n");
if(carYear > 1970 && carYear <=1991 )
printf("\nProbably has head rests.\n");
if(carYear > 1991 && carYear <=2002)
printf("\nProbably has anti-lock brakes\n.");
if(carYear > 2002)
printf("\nProbably has airbags.\n");
Explanation:
Following is the description of the statement:
- In the given question we used if block. The if block is only executed when their condition is true.
- if(carYear < 1968) In this we check we the value of "carYear" variable is less then 1968 then it prints "Probably has a few safety features." in the console window.
- if(carYear > 1970 && carYear <=1991) In this we check we the value of "carYear" variable is greater then 1970 and less then 1992 it prints "Probably has head rests" in the console window.
- if(carYear > 1991 && carYear <=2002 ) In this we check we the value of "carYear" variable is greater then 1991 and less then 2003 it prints "Probably has anti-lock brakes" in the console window.
- if(carYear > 2002) In this we check we the value of "carYear" variable is greater then 2002 then it prints "Probably has airbags" in the console window.