-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathft_putunbr_fd.c
22 lines (20 loc) · 1.08 KB
/
ft_putunbr_fd.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_putunbr_fd.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: szerisen <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2023/01/04 20:25:45 by szerisen #+# #+# */
/* Updated: 2023/01/08 20:25:45 by szerisen ### ########.fr */
/* */
/* ************************************************************************** */
#include "ft_printf.h"
void ft_putunbr_fd(unsigned int n, int fd, size_t *ret, size_t *i)
{
if (n > 9)
ft_putunbr_fd(n / 10, fd, ret, i);
ft_putchar_fd(n % 10 + 48, fd, ret);
if (n < 10)
*i = *i + 1;
}