003-002-003
Comparison Operators: Age Check Program
Easy
Problem Description
Comparison Operators: Age Check Program
In this problem, you will create a program that reads an integer age, compares it to 18 using the >= operator to determine if the person is an adult, and displays the result to standard output.
Learning Objective: Learn condition checking using >= comparison operator
Create a program that checks if the input age is 18 or older.
Input
Line 1: Age (integer)
Output
Age: [age]
Adult: [true/false]
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