Electrical and Computer Engineering
12 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
•17 2 x + 3 == y * 10 true
•
•
•Caution: The relational operator, ==, and the assignment operator, =, are not the same.
•