1017. If Else Adult Teen Problem
Given an integer age, print on the screen:
- Adult if age >= 18
- Teen if age < 18
Do not change the case of any letter in "Adult" and "Teen" while printing the answer.
For printing use:-
- for C++ : cout << variable_name<<endl;
- for Java : System.out.println();
- for Python : print()
- for Javascript : console.log()
Example 1:
Input: age = 19
Output: Adult
Explanation: age is greater than or equal to 18.
Example 2:
Input: age = 7
Output: Teen
Explanation: age is less than 18.
Now Your Turn!
Pick the correct output for the given inputInput: age = 18
Still unsure what the problem is asking ?
Let’s go through a few more examples, step by step, to make it clearer.
Constraints:
- 0 <= age <= 100