The process of relating two numbers using the symbols >,< or =
Answers
Answered by
2
The relation operators are
== for comparing
= for declaring the value
a<b this means a is less than b
b>a this means b is greater than a
=! this means does not equal
These are some relational operators
== for comparing
= for declaring the value
a<b this means a is less than b
b>a this means b is greater than a
=! this means does not equal
These are some relational operators
Answered by
0
Answer:
The process of relating two numbers using the symbols >,< or = is called comparison
Explanation:
- Comparison in math is to reflect the direction of difference between two or more numbers. The degree of difference is not in question here; we simply want to know whether one number is larger, smaller, and/or equal to another.
- Relational operators are crucial for decision-making. They enable us to evaluate whether one value is greater than, less than, equal to, or not equal to another by comparing numerical and char values (chars are treated as numbers in C++).
- Since relationship operators are binary, they need two operands. The associativity of relational operators is from left to right. When two operators with the same precedence are next to one another, left to right associativity states that the leftmost operator is evaluated first.
Relational Operators Meaning
> Greater than
< Less than
>= Greater than or equal to
<= Less than or equal to
== Equal to
!= Not equal to
- Each of these six relational operators takes two operands. These two operands must both be arithmetic or both be strings. For arithmetic operands, if they are of different types (i.e., one INTEGER and the other REAL), the INTEGER operand will be converted to REAL.
- The outcome of a comparison is a LOGICAL value. For example, 5 /= 3 is .TRUE. and 7 + 3 >= 20 is .FALSE.
Similar questions