Mandatory finished

This commit is contained in:
da7e committed 2025-11-17 12:40:49 +01:00
1 parent 506d90d9c1
commit dabbfa7a35
73 files changed
+238 -11

No files matched your search

+24
View File
@@ -0,0 +1,24 @@
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_putnbr_base.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: dgaillet <dgaillet@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2025/11/17 12:16:44 by dgaillet #+# #+# */
/* Updated: 2025/11/17 12:17:14 by dgaillet ### ########lyon.fr */
/* */
/* ************************************************************************** */
#include "../libft/libft.h"
int ft_putnbr_base(unsigned long long nbr, char *base, int base_size)
{
int i;
if (nbr == 0)
return (0);
i = 1 + ft_putnbr_base(nbr / base_size, base, base_size);
ft_putchar_fd(base[nbr % base_size], 1);
return (i);
}