Current location - Training Enrollment Network - Mathematics courses - How to express the c language expression of mathematical formula!
How to express the c language expression of mathematical formula!
The function log 10 is to find LG x;; The function abs(x) is a function for finding the absolute value, and the header files of these two functions are "# include".

# include & ltstdio.h & gt

# include & ltmath.h & gt

int main()

{

printf("%d\n ",log 10( 10)+ABS(-2));

Returns 0;

}

The output is 3.000000.

The Log 10 function is a double precision function and abs(x) is an int function.