003-003-004

Logical Operators: Entry Qualification Check

Easy

Problem Description

Logical Operators: Entry Qualification Check

In this problem, you will create a program that takes age and membership status as input, determines entry qualification using a logical operator (OR), and displays the result to standard output.

Learning Objective

Learn how to use logical operators (AND, OR).

Problem

Create a program that checks entry qualification based on age and membership status.
Entry is allowed if 18 or older OR if a member.

Input

Line 1: Age (integer)
Line 2: Member status (1=member, 0=non-member)

Output

Age: [age]
Member: [true/false]
Entry: [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