first commit
This commit is contained in:
22
finish/C01/ex04/ft_ultimate_div_mod.c
Normal file
22
finish/C01/ex04/ft_ultimate_div_mod.c
Normal file
@ -0,0 +1,22 @@
|
||||
/* ************************************************************************** */
|
||||
/* */
|
||||
/* ::: :::::::: */
|
||||
/* ft_ultimate_div_mod.c :+: :+: :+: */
|
||||
/* +:+ +:+ +:+ */
|
||||
/* By: adjoly <marvin@42.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2023/07/14 10:03:47 by adjoly #+# #+# */
|
||||
/* Updated: 2023/07/14 10:32:21 by adjoly ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
void ft_ultimate_div_mod(int *a, int *b)
|
||||
{
|
||||
int div;
|
||||
int mod;
|
||||
|
||||
div = *a / *b;
|
||||
mod = *a % *b;
|
||||
*a = div;
|
||||
*b = mod;
|
||||
}
|
Reference in New Issue
Block a user