-
Notifications
You must be signed in to change notification settings - Fork 0
/
print_nbr.c
28 lines (25 loc) · 1.07 KB
/
print_nbr.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
/* ************************************************************************** */
/* */
/* :::::::: */
/* print_nbr.c :+: :+: */
/* +:+ */
/* By: dreijans <[email protected]> +#+ */
/* +#+ */
/* Created: 2022/11/18 16:39:39 by dreijans #+# #+# */
/* Updated: 2022/11/30 19:05:58 by dreijans ######## odam.nl */
/* */
/* ************************************************************************** */
#include "ft_printf.h"
int print_nbr(int n)
{
int count;
char *nbr;
count = -1;
nbr = ft_itoa(n);
if (nbr != NULL)
{
count = write (1, nbr, ft_strlen(nbr));
free (nbr);
}
return (count);
}