isless() in C/C++
In C++, isless() is a predefined function used for mathematical calculations. math.h is the header file required for various mathematical functions.
isless() function used to check whether the 1st argument given to the function is less than the 2nd argument given to the function or not. Means if a is the 1st argument and b is the 2nd argument then it check whether a<b or not.
bool isless(a, b)
Time Complexity: O(1)
Auxiliary Space: O(1)
5 isless than nan: 0
5 isless than 8: 1 a isless than 8: 0
Note: Using this function you can compare any data type with any other data type as well.
There are variety of applications where we can use isless() function to compare two values like to use in while loop to print the first 9 natural number.
1 2 3 4 5 6 7 8 9
My Personal Notes arrow_drop_up
Please Login to comment...