From 0e5c3c9c47ec44c5e26dfd58d27e64b190ecf86d Mon Sep 17 00:00:00 2001 From: Cabergs Charles Date: Wed, 3 Jul 2019 18:19:13 +0200 Subject: c01 --- c01/ex04/ft_ultimate_div_mod.c | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 c01/ex04/ft_ultimate_div_mod.c (limited to 'c01/ex04') 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 +#+ +:+ +#+ */ +/* +#+#+#+#+#+ +#+ */ +/* 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; +} -- cgit