-
Notifications
You must be signed in to change notification settings - Fork 0
/
ft_cal_hexa.c
26 lines (23 loc) · 1.02 KB
/
ft_cal_hexa.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_cal_hexa.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: yel-aoun <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2021/11/30 19:08:44 by yel-aoun #+# #+# */
/* Updated: 2021/12/02 20:15:23 by yel-aoun ### ########.fr */
/* */
/* ************************************************************************** */
#include "ft_printf.h"
int ft_cal_hexa(unsigned long long x)
{
int div;
div = 1;
while (x >= 16)
{
div++;
x = x / 16;
}
return (div);
}