In C++, this function is overloaded in <cmath> for floating-point types (see cmath abs), in <complex> for complex numbers (see complex abs), and in <valarray> for valarrays (see valarray abs).
Parameters
- n
- Integral value.
Return Value
The absolute value of n.Portability
In C, only the int version exists.Example
| 1 2 3 4 5 6 7 8 9 10 11 12 13 |
|
Output:
n=23 m=11 |
See also
| labs | Absolute value (function) |
| fabs | Compute absolute value (function) |
| div | Integral division (function) |
