Headers changed

This commit is contained in:
Timo Schmidt 2023-03-19 05:35:58 +01:00
parent 1ebb907e4a
commit 62772db390
4 changed files with 44 additions and 5 deletions

View File

@ -6,7 +6,7 @@
/* By: tischmid <marvin@42.fr> +#+ +:+ +#+ */ /* By: tischmid <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */ /* +#+#+#+#+#+ +#+ */
/* Created: 2023/03/19 04:55:47 by tischmid #+# #+# */ /* Created: 2023/03/19 04:55:47 by tischmid #+# #+# */
/* Updated: 2023/03/19 05:07:53 by tischmid ### ########.fr */ /* Updated: 2023/03/19 05:23:01 by tischmid ### ########.fr */
/* */ /* */
/* ************************************************************************** */ /* ************************************************************************** */

View File

@ -6,7 +6,7 @@
/* By: tischmid <marvin@42.fr> +#+ +:+ +#+ */ /* By: tischmid <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */ /* +#+#+#+#+#+ +#+ */
/* Created: 2023/03/19 05:05:51 by tischmid #+# #+# */ /* Created: 2023/03/19 05:05:51 by tischmid #+# #+# */
/* Updated: 2023/03/19 05:09:45 by tischmid ### ########.fr */ /* Updated: 2023/03/19 05:22:55 by tischmid ### ########.fr */
/* */ /* */
/* ************************************************************************** */ /* ************************************************************************** */

View File

@ -6,7 +6,7 @@
/* By: tischmid <marvin@42.fr> +#+ +:+ +#+ */ /* By: tischmid <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */ /* +#+#+#+#+#+ +#+ */
/* Created: 2023/03/19 05:17:56 by tischmid #+# #+# */ /* Created: 2023/03/19 05:17:56 by tischmid #+# #+# */
/* Updated: 2023/03/19 05:20:57 by tischmid ### ########.fr */ /* Updated: 2023/03/19 05:22:50 by tischmid ### ########.fr */
/* */ /* */
/* ************************************************************************** */ /* ************************************************************************** */
@ -21,8 +21,8 @@ void ft_div_mod(int a, int b, int *div, int *mod)
int main(void) int main(void)
{ {
int div; int div;
int mod; int mod;
ft_div_mod(10, 3, &div, &mod); ft_div_mod(10, 3, &div, &mod);
printf("div %d mod %d\n", div, mod); printf("div %d mod %d\n", div, mod);

View File

@ -0,0 +1,39 @@
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_ultimate_div_mod.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: tischmid <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2023/03/19 05:22:13 by tischmid #+# #+# */
/* Updated: 2023/03/19 05:26:34 by tischmid ### ########.fr */
/* */
/* ************************************************************************** */
void ft_ultimate_div_mod(int *a, int *b)
{
int div;
int mod;
div = *a / *b;
mod = *a % *b;
*a = div;
*b = mod;
}
/* ////
#include <stdio.h>
int main(void)
{
int a;
int b;
a = 10;
b = 3;
printf("a %d b %d\n", a, b);
ft_ultimate_div_mod(&a, &b);
printf("div %d mod %d\n", a, b);
return (0);
}
*/ ////