Electrical and Computer Engineering
11
of 21
UAH
CPE 112
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
•
•
•
•
Caution: The relational operator, ==, and the assignment
operator, =, are not the same.
•