C isless function tells which value is smaller
Syntax
C isless function has the following syntax.
int isless(a, b)
Header
C isless function is
from header file math.h
.
Description
C isless function returns nonzero
if a
is less than b
.
Example
The following code can tell which value is smaller by using C isless function.
#include <stdio.h>
#include <math.h>
// w w w . j av a2 s . c om
int main(void)
{
printf("%d", isless(1.0, 2.0));
printf("%d", isless(1.0, 1.0));
printf("%d", isless(2.0, 1.0));
return 0;
}
The code above generates the following result.