div_t div ( int numer, int denom);
ldiv_t div (long int numer, long int denom);
div_t div ( int numer, int denom);
ldiv_t div ( long int numer, long int denom);
lldiv_t div (long long int numer, long long int denom);
Integral division
Returns the integral quotient and remainder of the division of numer by denom ( numer/denom ) as a structure of type div_t, ldiv_t or lldiv_t, which has two members: quot and rem.
Parameters
numer
Numerator.
denom
Denominator.
Return Value
The result is returned by value in a structure defined in <cstdlib>, which has two members. For div_t, these are, in either order: