-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathft_putnbrdl.c
33 lines (30 loc) · 1.12 KB
/
ft_putnbrdl.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_putnbrdl.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: ggane <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2016/12/01 09:31:29 by ggane #+# #+# */
/* Updated: 2016/12/01 09:33:01 by ggane ### ########.fr */
/* */
/* ************************************************************************** */
#include "libft.h"
void ft_putnbrdl(int n)
{
long long int lli;
lli = n;
if (lli < 0)
{
ft_putchar('-');
lli = -lli;
}
if (lli > 9)
{
ft_putnbr(lli / 10);
ft_putchar((lli % 10) + '0');
}
else
ft_putchar(lli + '0');
ft_putchar('\n');
}