В который раз пытаюсь разобраться с библиотечной функцией div() (man и книги не помогают) и ничего не получается.Помогите разобраться в коде: ------------------------------------------------------------------------ #include <stdlib.h> #include <stdio.h>
- Function: div_t div (int NUMERATOR, int DENOMINATOR)
This function `div' computes the quotient and remainder from the
division of NUMERATOR by DENOMINATOR, returning the result in a structure of type `div_t'.
If the result cannot be represented (as in a division by zero), the
behavior is undefined.
Here is an example, albeit not a very useful one.
div_t result;
result = div (20, -6);
Now `result.quot' is `-3' and `result.rem' is `2'.