-
Notifications
You must be signed in to change notification settings - Fork 0
/
ft_hexatolower.c
26 lines (23 loc) · 1.06 KB
/
ft_hexatolower.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_hexatolower.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: krios-fu <krios-fu@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2020/02/13 14:47:13 by krios-fu #+# #+# */
/* Updated: 2020/02/29 19:09:53 by krios-fu ### ########.fr */
/* */
/* ************************************************************************** */
#include "printf.h"
void ft_hexatolower(size_t nb)
{
size_t n;
char c;
n = nb;
if (n >= 16)
ft_hexatolower(n / 16);
n = n % 16;
c = n < 10 ? n + '0' : n + 87;
ft_putchar_fd(c, 1);
}