-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathft_printf_hex.c
19 lines (18 loc) · 1.04 KB
/
ft_printf_hex.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_printf_hex.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: agoksu <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2022/11/27 17:34:25 by agoksu #+# #+# */
/* Updated: 2022/11/27 17:34:27 by agoksu ### ########.fr */
/* */
/* ************************************************************************** */
#include "ft_printf.h"
void ft_printf_hex(unsigned long long nb, int *i)
{
if (nb >= 16)
ft_printf_hex(nb / 16, i);
ft_printf_char("0123456789abcdef"[nb % 16], i);
}