-
Notifications
You must be signed in to change notification settings - Fork 0
/
ft_putuint_printf.c
26 lines (23 loc) · 1.09 KB
/
ft_putuint_printf.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
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_putuint_printf.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: jbergos <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/10/24 00:55:53 by jbergos #+# #+# */
/* Updated: 2024/10/24 22:26:59 by jbergos ### ########.fr */
/* */
/* ************************************************************************** */
#include "ft_printf.h"
int ft_putuint_printf(int n)
{
int i;
unsigned int nb;
i = 0;
nb = (unsigned int)n;
if (nb > 9)
i += ft_putint_printf(nb / 10);
i += ft_putchar_printf((nb % 10) + '0');
return (i);
}