Electrical and Computer Engineering
8 of 21
UAH
CPE 112
Relational Operators
•Relational Operators test the relationship between two values.
•Example  bool lessThan; int i, j;
–cin >> i >> j;
–lessThan = (i < j);
•Operators
–== Equal to
–!= Not equal to
–> Greater than
–< Less than
–>= Greater than or equal to
–<= Less than or equal to
•