005-004-008
Using AND in Compound Conditions
Medium
Problem Description
Using AND in Compound Conditions
In this problem, you will create a program that reads an integer x from standard input, checks whether it falls within a specified range using the AND operator, and displays the result to standard output.
Learning Objective: Understand how to combine multiple conditions with AND operator
Overview
Join multiple conditions with AND operator and determine if all are met.
Specifications
- Read an integer
xfrom standard input on one line - Output "In range" if x is 10 or more AND 20 or less
- Otherwise output "Out of range"
Input Format
x
Output Format
In range
or
Out of range
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