Clunker Motors Inc. is recalling all vehicles from model years 2001-2006. Given a variable modelYear write a statement that prints the message "NO RECALL" to standard output if the value of modelYear DOES NOT fall within that range.

Respuesta :

Answer: if(modelYear<2001 && modelYear>2006 ){

cout<<"NO RECALL";

}

Explanation: This code is written in C++ language. If statement is best way to solve this. If variable modelYear is lower than 2001 it will not fall within the range and the string "NO RECALL" will be the output. Also if variable modelYear is greater than 2006 same output will be displayed. "&&" is operator for "and". "cout" is function for printing to console.

ACCESS MORE