003-002-010

Basic Comparison Operators

Easy

Problem Description

Basic Comparison Operators

Learning Objective: Understand how to use equality (==, !=) and relational (<, >, <=, >=) operators

Overview

Compare two integers and output results of each comparison operator.

Specifications

  • Initialize integer a with 10, b with 5
  • Output results of ==, !=, <, >, <=, >=

Output Format

10 == 5: false
10 != 5: true
10 < 5: false
10 > 5: true
10 <= 5: false
10 >= 5: true

Ready to Try Running Code?

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

Don't have an account?