ldiv.c 918 Bytes
/*
=============================================================================
        Copyright (C) 1997-1999 NINTENDO Co.,Ltd.
        
        $RCSfile: ldiv.c,v $
        $Revision: 1.1.1.1 $
        $Date: 2002/10/30 02:07:09 $
=============================================================================
関数名:_nldiv
-----------------------------------------------------------------------------
書式:  #include <stdlib.h>
        ldiv_t *_nldiv(long int numer, long int denom);
引数:  number 割られる数
        denom 割る数
戻り値:ldiv_t 型の構造体を返す
説明:  引数 numberを引数 denomで割り、商と乗余からなるldiv_t構造体を返す。
-----------------------------------------------------------------------------
*/
#include    "stdlib.h"

ldiv_t _nldiv(long int numer, long int denom)
{
    ldiv_t  ldiv_t_n;
    
    ldiv_t_n.quot = numer / denom;
    ldiv_t_n.rem = numer % denom;
    return  ldiv_t_n;
}