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

div_t div(int numer, int denom)
{
    static  div_t   div_t_n;

    div_t_n.quot = numer / denom;
    div_t_n.rem = numer % denom;
    return  div_t_n;
}