-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathft_x.c
27 lines (24 loc) · 1.05 KB
/
ft_x.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
27
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_x.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: ychihab <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2022/10/30 16:42:47 by ychihab #+# #+# */
/* Updated: 2022/11/03 10:32:11 by ychihab ### ########.fr */
/* */
/* ************************************************************************** */
#include "ft_printf.h"
void ft_x(unsigned int n, int *j)
{
char *s;
s = "0123456789abcdef";
if (n >= 16)
{
ft_x(n / 16, j);
ft_x(n % 16, j);
}
else
ft_putchar(s[n], j);
}