What exactly is the relationship between these “not” and “or” operators? Is there an “and” operator, and is it useful here? Isn't this excessively complex? Not if you approach it carefully.
First, let's recap the simple bool expression in a little more detail. Remember that a bool expression can be true or false. There are six bool relational operators, used to compare values. Like +, they are infix operators, so they have an operand to the left and an operand to the right. Table 10.1 shows their names, symbols, examples of their use, and the example values.
|Equal to||==||100 == 50; 50 == 50;||false true|
|Not equal to||!=||100 != 50; 50 != 50;||true false|
|Greater than ...|