From 22090c3fb4cac2178f76c94118d4d444da681741 Mon Sep 17 00:00:00 2001 From: lclerel- lclerel- Date: Mon, 9 Mar 2026 13:09:47 +0100 Subject: [PATCH] Comment Putnbr --- ex0/ft_iterative_factorial.c | 9 +++++---- ex1/ft_recursive_factorial.c | 6 +++--- ex2/ft_iterative_power.c | 6 +++--- ex3/ft_recursive_power.c | 6 +++--- ex4/ft_fibonacci.c | 6 +++--- 5 files changed, 17 insertions(+), 16 deletions(-) diff --git a/ex0/ft_iterative_factorial.c b/ex0/ft_iterative_factorial.c index 0576149..d16c10e 100644 --- a/ex0/ft_iterative_factorial.c +++ b/ex0/ft_iterative_factorial.c @@ -6,16 +6,15 @@ /* By: lclerel- +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2026/03/09 10:08:57 by lclerel- #+# #+# */ -/* Updated: 2026/03/09 12:11:21 by lclerel- ### ########.fr */ +/* Updated: 2026/03/09 13:07:20 by lclerel- ### ########.fr */ /* */ /* ************************************************************************** */ #include -void ft_putnbr(int nb) +/*void ft_putnbr(int nb) { char value; - if (nb == -2147483648) { write(1, "-2147483648", 11); @@ -30,8 +29,10 @@ void ft_putnbr(int nb) { ft_putnbr(nb / 10); } + value = nb % 10 + '0'; -} + write(1, &value, 1); +}*/ int ft_iterative_factorial(int nb) { diff --git a/ex1/ft_recursive_factorial.c b/ex1/ft_recursive_factorial.c index f3c315a..9330cd6 100644 --- a/ex1/ft_recursive_factorial.c +++ b/ex1/ft_recursive_factorial.c @@ -6,13 +6,13 @@ /* By: lclerel- +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2026/03/09 09:57:06 by lclerel- #+# #+# */ -/* Updated: 2026/03/09 12:15:25 by lclerel- ### ########.fr */ +/* Updated: 2026/03/09 13:09:08 by lclerel- ### ########.fr */ /* */ /* ************************************************************************** */ #include -void ft_putnbr(int nb) +/*void ft_putnbr(int nb) { char value; @@ -31,7 +31,7 @@ void ft_putnbr(int nb) ft_putnbr(nb / 10); } value = nb % 10 + '0'; -} +}*/ int ft_recursive_factorial(int nb) { diff --git a/ex2/ft_iterative_power.c b/ex2/ft_iterative_power.c index 08efc2a..e9118c4 100644 --- a/ex2/ft_iterative_power.c +++ b/ex2/ft_iterative_power.c @@ -6,13 +6,13 @@ /* By: lclerel- +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2026/03/09 10:22:48 by lclerel- #+# #+# */ -/* Updated: 2026/03/09 12:15:33 by lclerel- ### ########.fr */ +/* Updated: 2026/03/09 13:09:15 by lclerel- ### ########.fr */ /* */ /* ************************************************************************** */ #include -void ft_putnbr(int nb) +/*void ft_putnbr(int nb) { char value; @@ -31,7 +31,7 @@ void ft_putnbr(int nb) ft_putnbr(nb / 10); } value = nb % 10 + '0'; -} +}*/ int ft_iterative_power(int nb, int power) { diff --git a/ex3/ft_recursive_power.c b/ex3/ft_recursive_power.c index 163249a..2792cdc 100644 --- a/ex3/ft_recursive_power.c +++ b/ex3/ft_recursive_power.c @@ -6,13 +6,13 @@ /* By: lclerel- +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2026/03/09 10:34:20 by lclerel- #+# #+# */ -/* Updated: 2026/03/09 12:15:39 by lclerel- ### ########.fr */ +/* Updated: 2026/03/09 13:09:22 by lclerel- ### ########.fr */ /* */ /* ************************************************************************** */ #include -void ft_putnbr(int nb) +/*void ft_putnbr(int nb) { char value; @@ -31,7 +31,7 @@ void ft_putnbr(int nb) ft_putnbr(nb / 10); } value = nb % 10 + '0'; -} +}*/ int ft_recursive_power(int nb, int power) { diff --git a/ex4/ft_fibonacci.c b/ex4/ft_fibonacci.c index 49004c7..88c3165 100644 --- a/ex4/ft_fibonacci.c +++ b/ex4/ft_fibonacci.c @@ -6,13 +6,13 @@ /* By: lclerel- +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2026/03/09 10:48:57 by lclerel- #+# #+# */ -/* Updated: 2026/03/09 12:15:45 by lclerel- ### ########.fr */ +/* Updated: 2026/03/09 13:09:29 by lclerel- ### ########.fr */ /* */ /* ************************************************************************** */ #include -void ft_putnbr(int nb) +/*void ft_putnbr(int nb) { char value; @@ -31,7 +31,7 @@ void ft_putnbr(int nb) ft_putnbr(nb / 10); } value = nb % 10 + '0'; -} +}*/ int ft_fibonacci(int index) {