#include <stdlib.h>
|
|
long long
llabs (long long j); |
#include <stdio.h>
#include <stdlib.h>
int main( void )
{
int ix = -4, iy;
long lx = -41567L, ly;
long long llx = -5343546758, lly;
iy = abs( ix );
printf( "The abs value of %d is %d\n", ix, iy);
ly = labs( lx );
printf( "The abs value of %ld is %ld\n", lx, ly);
lly = llabs( llx );
printf( "The abs value of %lld is %lld\n", llx, lly );
return 0;
}
Output
The absolute value of -4 is 4
The absolute value of -41567 is 41567
The absolute value of -5343546758 is 5343546758
|
© 2005-2007 Nokia |