Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void ft_putnbr_fd(int n, int fd)
- {
- if (n == -2147483648)
- ft_putstr_fd("-2147483648", fd);
- if (n < 0 && n > -2147483648)
- {
- ft_putchar_fd('-', fd);
- n *= -1;
- }
- if (n < 10 && n > -2147483648)
- ft_putchar_fd((n + 48), fd);
- else if (n >= 10)
- {
- ft_putnbr_fd((n / 10), fd);
- ft_putnbr_fd((n % 10), fd);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement