Contenu du cours

Write a program to determine the appropriate message based on the user's age

Write a program that takes a user's age as input and prints "You are a minor" if the age is less than 18, "You are an adult" if the age is between 18 and 65 (inclusive), and "You are a senior" if the age is greater than 65.

Input: 25
Output: You are an adult

Write a program that takes a user's age as input and prints "You are a minor" if the age is less than 18, "You are an adult" if the age is between 18 and 65 (inclusive), and "You are a senior" if the age is greater than 65.

Input: 25
Output: You are an adult

Évaluation
0 0

Il n'y a aucun commentaire pour le moment.

pour être le premier à laisser un commentaire.

1. In the age category code, what condition is checked after the minor condition to determine if a person is an adult?