-
Notifications
You must be signed in to change notification settings - Fork 0
/
ft_ultimate_div_mod.c
25 lines (23 loc) · 1.02 KB
/
ft_ultimate_div_mod.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_ultimate_div_mod.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: nkuzminy <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2022/07/19 14:51:36 by nkuzminy #+# #+# */
/* Updated: 2022/07/19 15:04:36 by nkuzminy ### ########.fr */
/* */
/* ************************************************************************** */
void ft_ultimate_div_mod(int *a, int *b)
{
int div;
int mod;
if (*b != 0)
{
div = (*a) / (*b);
mod = (*a) % (*b);
*a = div;
*b = mod;
}
}