#include <unistd.h>
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)
return;
if (nb < 0)
ft_putchar("-")
nb = (nb * -1)
if (nb / 10 != 0)
ft_putchar(nb / 10);
c = '0' + (nb % 10);
ft_putchar(c)
}
int main(void)
{
ft_putnbr(-218);
}
To embed this project on your website, copy the following code and paste it into your website's HTML: