-
Notifications
You must be signed in to change notification settings - Fork 0
/
ft_xtochar.c
21 lines (20 loc) · 992 Bytes
/
ft_xtochar.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_xtochar.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: lenzo-pe <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2021/04/08 22:32:24 by lenzo-pe #+# #+# */
/* Updated: 2021/05/07 17:26:00 by lenzo-pe ### ########.fr */
/* */
/* ************************************************************************** */
int ft_xtochar(unsigned int n)
{
n %= 16;
if (n >= 10)
n += 87;
else
n += 48;
return (n);
}