Name

abs function — Computes an absolute value

Synopsis

int abs(int x)
long abs(long x)

The abs function returns the absolute value of x. The <cmath> header declares floating-point versions of the abs function.