aboutsummaryrefslogtreecommitdiff
path: root/c01/ex03
diff options
context:
space:
mode:
Diffstat (limited to 'c01/ex03')
-rw-r--r--c01/ex03/ft_div_mod.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/c01/ex03/ft_div_mod.c b/c01/ex03/ft_div_mod.c
new file mode 100644
index 0000000..7a5e784
--- /dev/null
+++ b/c01/ex03/ft_div_mod.c
@@ -0,0 +1,17 @@
+/* ************************************************************************** */
+/* */
+/* ::: :::::::: */
+/* ft_div_mod.c :+: :+: :+: */
+/* +:+ +:+ +:+ */
+/* By: cacharle <charles.cabergs@gmail.com> +#+ +:+ +#+ */
+/* +#+#+#+#+#+ +#+ */
+/* Created: 2019/07/03 17:52:21 by cacharle #+# #+# */
+/* Updated: 2019/07/03 18:16:18 by cacharle ### ########.fr */
+/* */
+/* ************************************************************************** */
+
+void ft_div_mod(int a, int b, int *div, int *mod)
+{
+ *div = a / b;
+ *mod = a % b;
+}