#include <unistd.h>

void	ft_putnbr(int nb)
{
	char	z;

	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)
		{
			z = nb + '0';
			write(1, &z, 1);
		}
	}
}

int	main(void)
{
	ft_putnbr(-111111);
	return 0;
}

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: