-
Notifications
You must be signed in to change notification settings - Fork 0
/
ft_putnbr_unsigned.c
24 lines (22 loc) · 1.06 KB
/
ft_putnbr_unsigned.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
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_putnbr_unsigned.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: waraissi <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2022/11/09 18:42:25 by waraissi #+# #+# */
/* Updated: 2022/11/10 18:14:55 by waraissi ### ########.fr */
/* */
/* ************************************************************************** */
#include "ft_printf.h"
void ft_putnbr_unsigned(unsigned int nbr, int *res)
{
if (nbr < 10)
ft_putchar(nbr + 48, res);
else
{
ft_putnbr(nbr / 10, res);
ft_putnbr(nbr % 10, res);
}
}