Relational Operator Examples
x
y
Expression
Result
12
2
x + 3 <= y * 10
true
20
2
x + 3 <= y * 10
false
7
1
x + 3 != y * 10
false
17
2
x + 3 == y * 10
true
100
5
x + 3 > y * 10
true
•
Caution: The relational operator, ==, and the assignment
operator, =, are not the same.