Files
42_INT_01_libft/srcs/ft_putnbr.c
asus 603303a21b - re-added ft_putchar/putnbr/putstr without fd
- added const for pointers in these functions
2024-01-11 10:36:13 +01:00

18 lines
177 B
C

#include "libft.h"
void ft_putnbr(int n)
{
long l;
l = n;
if (l < 0)
{
ft_putchar('-');
l *= -1;
}
if (l >= 10)
ft_putnbr(l / 10);
ft_putchar((l % 10) + '0');
}