Built-in functions
Any programming language includes many built-in functions that can be used in arithmetic expressions. To use additional functions, you often have to include maths library:
#include<cmath>
For example, the most commonly used standard mathematical functions and their writing in C and C ++
abs(i) - |i|
- absolute value of an integer i
fabs(x) - |x|
- absolute value of a real числа x
sqrt(x) -
\(\sqrt x\)
pow(x,y) -
xy
Remember!
The function argument is always written in brackets.
For these functions to work, you need to include maths library: #include<cmath>