Mega Code Archive
Categories
/
C
/
Math
Return absolute value of floating-point
#include
#include
int main () { printf ("Absoulte value of 3.14 is %lf\n", fabs (3.14) ); printf ("Absoulte value of -11.6 is %lf\n", fabs (-11.6) ); return 0; }