-
Notifications
You must be signed in to change notification settings - Fork 1
/
ft_putuphex.c
26 lines (24 loc) · 1.1 KB
/
ft_putuphex.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
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_putuphex.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: rel-fila <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2022/11/08 16:59:11 by rel-fila #+# #+# */
/* Updated: 2022/11/08 16:59:43 by rel-fila ### ########.fr */
/* */
/* ************************************************************************** */
#include "ft_printf.h"
void ft_putuphex(unsigned int n, int *count)
{
if (n >= 16)
{
ft_putuphex(n / 16, count);
ft_putuphex(n % 16, count);
}
else if (n < 10)
ft_putchar(n + 48, count);
else
ft_putchar(n + 55, count);
}