Answers for "fabs c++"

C++
0

fabs c++

/* fabs example */
#include <stdio.h>      /* printf */
#include <math.h>       /* fabs */

int main ()
{
  printf ("The absolute value of 3.1416 is %f\n", fabs (3.1416) );
  printf ("The absolute value of -10.6 is %f\n", fabs (-10.6) );
  return 0;
}

/* Output */

The absolute value of 3.1416 is 3.141600
The absolute value of -10.6 is 10.600000
Posted by: Guest on June-16-2021

Browse Popular Code Answers by Language