fabs - Returns absolute value of number in C


  #include <math.h>
  #include <stdio.h>

  int main(void)
  {
    printf("%1.1f %1.1f", fabs(1.0), fabs(-1.0));

    return 0;
  }


Output:
1.0 1.0