C examples for stdlib.h:llabs
<cstdlib> <stdlib.h>
Returns the absolute value of parameter n (|n|). This is the long long int version of abs.
long long int llabs (long long int n);
Parameter | Description |
---|---|
n | Integral value. |
The absolute value of n.
#include <stdio.h> #include <stdlib.h> int main ()//from w w w. ja va2 s . c om { long long int n,m; n=llabs(31991234LL); m=llabs(-109901234LL); printf ("n=%lld\n",n); printf ("m=%lld\n",m); return 0; }