-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathft_ultimate_div_mod.c
38 lines (31 loc) · 1.16 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
26
27
28
29
30
31
32
33
34
35
36
37
38
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_ultimate_div_mod.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: danalvar <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/10/21 22:34:43 by danalvar #+# #+# */
/* Updated: 2024/10/21 22:57:31 by danalvar ### ########.fr */
/* */
/* ************************************************************************** */
/*#include <unistd.h>*/
void ft_ultimate_div_mod(int *a, int *b)
{
int tmp;
tmp = *a / *b;
*b = *a % *b;
*a = tmp;
}
/*int main(void)
{
int a;
int b;
a = 10;
b = 5;
ft_ultimate_div_mod(&a, &b);
char sa = a + '0';
char sb = b + '0';
write (1, &sa, 1);
write (1, &sb, 1);
}*/