/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* ft_putnbr.c :+: :+: :+: */ /* +:+ +:+ +:+ */ /* By: sgongas +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2026/02/22 23:03:38 by sgongas #+# #+# */ /* Updated: 2026/02/22 23:12:01 by sgongas ### ########.fr */ /* */ /* ************************************************************************** */ #include void ft_putchar(char c) { write(1, &c, 1); } void ft_putnbr(int nb) { if (nb == -2147483648) { write(1, "-2147483648", 11); return ; } if (nb < 0) { ft_putchar('-'); nb = -nb; } if (nb > 9) ft_putnbr(nb / 10); ft_putchar(nb % 10 + '0'); } // int main(void) // { // ft_putnbr(21474); // return (0); // }