diff options
| author | Charles <sircharlesaze@gmail.com> | 2019-07-03 18:19:13 +0200 |
|---|---|---|
| committer | Charles <sircharlesaze@gmail.com> | 2019-07-03 18:19:13 +0200 |
| commit | 3086fc662802db86395f439b9ab4ebc44358b5fa (patch) | |
| tree | d7dd9ecbe0c7b2481b2fe702d9f96179f1268090 /c01/ex04 | |
| parent | e65f1a0088a86af0426bc523f017631066cc9c42 (diff) | |
| download | piscine-3086fc662802db86395f439b9ab4ebc44358b5fa.tar.gz piscine-3086fc662802db86395f439b9ab4ebc44358b5fa.tar.bz2 piscine-3086fc662802db86395f439b9ab4ebc44358b5fa.zip | |
c01
Diffstat (limited to 'c01/ex04')
| -rw-r--r-- | c01/ex04/ft_ultimate_div_mod.c | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/c01/ex04/ft_ultimate_div_mod.c b/c01/ex04/ft_ultimate_div_mod.c new file mode 100644 index 0000000..a2745fa --- /dev/null +++ b/c01/ex04/ft_ultimate_div_mod.c @@ -0,0 +1,22 @@ +/* ************************************************************************** */ +/* */ +/* ::: :::::::: */ +/* ft_ultimate_div_mod.c :+: :+: :+: */ +/* +:+ +:+ +:+ */ +/* By: cacharle <charles.cabergs@gmail.com> +#+ +:+ +#+ */ +/* +#+#+#+#+#+ +#+ */ +/* Created: 2019/07/03 17:54:22 by cacharle #+# #+# */ +/* Updated: 2019/07/03 18:17:03 by cacharle ### ########.fr */ +/* */ +/* ************************************************************************** */ + +void ft_ultimate_div_mod(int *a, int *b) +{ + int div_tmp; + int mod_tmp; + + div_tmp = *a / *b; + mod_tmp = *a % *b; + *a = div_tmp; + *b = mod_tmp; +} |
