005-002-014

If-Else: Age Classification

Medium

Problem Description

If-Else: Age Classification

In this problem, you will create a program that reads an age value from standard input, uses if-else statements to classify it into an admission category, and displays the result to standard output.

Learning Objective: Implement classification using multiple conditions

Overview

Create a program that determines admission category based on age.

Specifications

  • Read one integer (age) from standard input
  • Classify based on:
    • 12 or below: "Category: Child"
    • 13 to 17: "Category: Teen"
    • 18 to 64: "Category: Adult"
    • 65 or above: "Category: Senior"

Input/Output Format

Input:
25

Output:
Category: Adult

Ready to Try Running Code?

Log in to access the code editor and execute your solutions for this problem.

Don't have an account?

Sign Up