
Calculating the Absolute Value of a Number
The standard functions abs() and labs() (declared in ) return the absolute value of int and long, respectively. You can use these functions in computations that need absolute values. For example: int begin = 0, end = 100;int offset = abs(begin