-
Notifications
You must be signed in to change notification settings - Fork 0
/
ft_nbrlen_base.c
24 lines (22 loc) · 1 KB
/
ft_nbrlen_base.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
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_nbrlen_base.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: ylagtab <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2019/09/22 00:05:39 by ylagtab #+# #+# */
/* Updated: 2020/10/14 12:02:19 by ylagtab ### ########.fr */
/* */
/* ************************************************************************** */
int ft_nbrlen_base(unsigned long long nbr, int base)
{
int len;
len = 1;
while (nbr)
{
len++;
nbr /= base;
}
return (len);
}