diff options
Diffstat (limited to 'lib/libc/stdlib/div.c')
| -rw-r--r-- | lib/libc/stdlib/div.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/libc/stdlib/div.c b/lib/libc/stdlib/div.c new file mode 100644 index 00000000..cadc292e --- /dev/null +++ b/lib/libc/stdlib/div.c @@ -0,0 +1,9 @@ +#include <stdlib.h> + +div_t div(int numer, int denom) +{ + div_t result; + result.quot = numer / denom; + result.rem = numer % denom; + return result; +} |
