Knaph

Control Flow and Functions19 of 62

Age Group

Read an integer age from standard input and print exactly one of child, teen, or adult:

  • age >= 18 → adult
  • age >= 13 → teen
  • otherwise → child

Sign in to try this exercise.