Clunker Motors Inc is recalling all vehicles from model years 2001 – 2006. Given a variable modelYear write a statement that prints the message “RECALL” to standard output if the value of modelYear falls within that range.

LANGUAGE: Visual Basic

CHALLENGE:

Clunker Motors Inc is recalling all vehicles from model years 2001 – 2006. Given a variable modelYear write a statement that prints the message “RECALL” to standard output if the value of modelYear falls within that range.

SOLUTION:

If modelYear >= 2001 And modelYear <= 2006 Then
    MessageBox.Show("RECALL")
End If