C++ Programming/Code/Standard C Library/Functions/div

div
The function div returns the quotient and remainder of the operation numerator / denominator. The div_t structure is defined in cstdlib, and has at least:

For example, the following code displays the quotient and remainder of x/y:


 * Related topics: ldiv