Relational Operators or Comparison Operators:
When you want to compare two numbers to see which is bigger, if they're equal, or some other type of relationship use the comparison operators listed below. Common uses of comparison operators are within conditional statements like an If Statement or the condition check in a While Loop.
Operator
|
Name
|
Example
|
Result
|
=
|
Equal To
|
10 =1 4
|
False
|
>
|
Greater Than
|
10 > 14
|
False
|
<
|
Less Than
|
10 < 14
|
True
|
>=
|
Greater Than Or Equal To
|
10 >= 14
|
False
|
<=
|
Less Than Or Equal To
|
10 <= 14
|
True
|
<>
|
Not Equal To
|
10 <> 14
|
True
|
No comments:
Post a Comment