-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathft_puthex.c
24 lines (22 loc) · 1.08 KB
/
ft_puthex.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_puthex.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: abertran <abertran@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2022/11/18 18:34:12 by abertran #+# #+# */
/* Updated: 2022/11/18 19:55:40 by abertran ### ########.fr */
/* */
/* ************************************************************************** */
#include "ft_printf.h"
void ft_puthex(unsigned long long nb, char *dic, int *len)
{
if (nb >= 16)
{
ft_puthex(nb / 16, dic, len);
ft_puthex(nb % 16, dic, len);
}
else
ft_putcharlen(dic[nb], len);
}