#include <unistd.h>
void ft_putnbr(int nb)
{
char p;
if (nb == -2147483648)
{
write(1, "-2147483648", 11);
}
else
{
if (nb < 0)
{
write(1, "-", 1);
nb = nb * (-1);
}
if (nb > 9)
{
ft_putnbr(nb / 10);
ft_putnbr(nb % 10);
}
if (nb < 10)
{
p = nb + '0';
write(1, &p, 1);
}
}
}
To embed this project on your website, copy the following code and paste it into your website's HTML: