-
Notifications
You must be signed in to change notification settings - Fork 0
/
ft_printhex.c
24 lines (22 loc) · 1.07 KB
/
ft_printhex.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_printhex.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: mmita <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2023/01/07 15:45:01 by mmita #+# #+# */
/* Updated: 2023/01/28 18:24:36 by mmita ### ########.fr */
/* */
/* ************************************************************************** */
#include "ft_printf.h"
void ft_printhex(unsigned long long n, int *i, char *base)
{
if (n > 15)
{
ft_printhex((n / 16), i, base);
ft_printhex((n % 16), i, base);
}
else
ft_printchar(base[n], i);
}