Exercise 1 – How old are you?

Make a program which displays a different message depending on the age given. Here are the possible responses:

  • age is less than 16, say “You can’t drive.”
  • age is less than 18, say “You can’t vote.”
  • age is less than 25, say “You can’t rent a car.”
  • age is 25 or over, say “You can do anything that’s legal.”

Notice that a person who is under 16 will display three messages, one for being under 16, one for also being under 18, and one for also being under 25.