Digg StumbleUpon LinkedIn YouTube Flickr Facebook Twitter RSS Reset

C/C++: Obtenir la valeur absolue d’une variable de type ‘long()’


{filelink=13987}

 
#include <stdio.h>
#include
<math.h>
 
int main ()
{
  int x, y;
  x = labs( 600000000 );
  y = labs( -6000000 );
  printf (" x = %d", x);
  printf (" y = %d", y);
 
  return 0;
}

No comments yet.

Leave a Comment