Course Content
C Basics
C Basics
Comparison Operators Practice
Reviewing Comparison Operators
Below is a recap of the comparison operators we've covered:
Operation | Symbol | Usage Example |
---|---|---|
Equality | == | a == b |
Inequality | != | a != b |
Greater than | > | a > b |
Less than | < | a < b |
Greater than or equal to | >= | a >= b |
Less than or equal to | <= | a <= b |
You'll be using some of these operators in the upcoming task.
Task
Swipe to show code editor
Insert the appropriate inequality symbol (either <
or >
) so the expression evaluates to 1
.
Solution
Switch to desktop for real-world practiceContinue from where you are using one of the options below
Everything was clear?
Thanks for your feedback!
Section 3. Chapter 5
Comparison Operators Practice
Reviewing Comparison Operators
Below is a recap of the comparison operators we've covered:
Operation | Symbol | Usage Example |
---|---|---|
Equality | == | a == b |
Inequality | != | a != b |
Greater than | > | a > b |
Less than | < | a < b |
Greater than or equal to | >= | a >= b |
Less than or equal to | <= | a <= b |
You'll be using some of these operators in the upcoming task.
Task
Swipe to show code editor
Insert the appropriate inequality symbol (either <
or >
) so the expression evaluates to 1
.
Solution
Switch to desktop for real-world practiceContinue from where you are using one of the options below
Everything was clear?
Thanks for your feedback!
Section 3. Chapter 5
Switch to desktop for real-world practiceContinue from where you are using one of the options below