Describe the use of "">"" operator?
Answers
Answered by
0
" > " operator is the operator which is called as greater than operator.
- It is used to check whether the value of the left operand is greater than the value of the right operand.
- If the value of the left operand is greater than the value of the right operand then the output is True otherwise False.
- It is a comparison operator.
- This operator can be understood with the help of example given below :
#include <iostream>
using namespace std;
int main ( )
{
int x = 5;
int y = 3;
cout << (x > y) ;
return 0;
}
- This code will return 1 (true) because 5 is greater than 3.
Answered by
0
Use of "">"" relational operator
Explanation:
- Operators are the foundation of any programming language. Relational operators are used to comparing two values to consider a pair of number shares as to the form of relationship. Commonly use relational operators are (>, <, ==, !=, >=, < =).
- Greater than operator is represented as ‘>', check whether the first operand is greater than the second operand or not. If so, it returns true. Otherwise, it returns false.
- For example, 6>5 will return true.
Similar questions
Math,
5 months ago
Computer Science,
11 months ago
Computer Science,
11 months ago
Accountancy,
1 year ago