islessgreater() in C++

islessgreater(): This function is available in the file cmath. This function checks that the first number (x) is less than or greater than the second number (y).

Cases:

If x<y or x>y: It returns true.

If x == y : It returns false(0).

Parameters: Two parameters are required for this function.

x: The first value.

y: The second value.

Syntax:

islessgreater(x,y)

For Example:

islessgreater(10,12) = > It return true.

islessgreater(12,10)  = > It return true.

islessgreater(10,10) = > It return false(0).

Approach

C++

#include <bits/stdc++.h>
using namespace std;

int main()
{
    double X = 10Y = 12;
    cout << islessgreater(XY<< "\n";

    return 0;
}


No comments:

Post a Comment