If Else Adult Teen Problem

Beginner Problems Language Basics Easy

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;
  • for Java : System.out.print();
  • for Python : print()
  • for Javascript : console.log()

Examples:

Input: age = 19

Output: Adult

Explanation: age is greater than or equal to 18.

Input: age = 7

Output: Teen

Explanation: age is less than 18.

Input: age = 18

Constraints

  • 0 <= age <= 100

Company Tags

TCS Cognizant Accenture Infosys Capgemini Wipro IBM HCL Tech Mahindra MindTree