SilverScreen Solid Modeler

ldiv

ldiv

Previous topic Next topic  

ldiv

Previous topic Next topic JavaScript is required for the print function  

StandardCLibrary

 

ldiv_t ldiv( long n, long d )

 

long n;       /* numerator */

long d;       /* divisor */

 

 




Synopsis

#include "stdlib.h"

 

The ldiv function computes the quotient and remainder of the division of n by d .

 

 

Parameters

n and d may be any long integers; d may not be 0.

 

 

Return Value

ldiv returns a struct of type ldiv_t , containing the quotient and remainder, as defined in stdlib.h . If the result cannot be represented, the behavior of ldiv is undefined.

 

 

Comments

if d is 0, then the program will halt.

 

 

See Also

div