Given an Integer age
, return a string indicating whether the person is an "Infant", "Child", or "Adult".
Inclusive Range | Stage of Life |
---|---|
0-1 | Infant |
2-17 | Child |
18+ | Adult |
Example 1:
Input: age = 1
Output: Infant
Explanation: 1 is in the range 0-1
Example 2:
Input: age = 16
Output: Child
Explanation: 16 is in the range 0-17
Example 3:
Input: age = 18
Output: Adult
Explanation: 18 is in the range of 18+
Constraints:
- 0 <= age <= 100
- It is guaranteed that
age
will never be null