Clunker Motors Inc. is recalling all vehicles in its Extravagant line from model years 1999-2002. Given an int variable modelYear and a string modelName write a statement that prints the message "RECALL" to standard output if the values of modelYear and modelName match the recall details.
.
.
Click on the title for the solution
.
.
.
Click on the title for the solution
.
.
This is the answer:
:
if (modelYear>=1999 && modelYear<=2002 && modelName=="Extravagant") cout<<"RECALL";
Comments
Post a Comment