-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathft_nb_len_base.c
21 lines (19 loc) · 1.03 KB
/
ft_nb_len_base.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_nb_len_base.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: thifranc <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2016/03/12 16:10:29 by thifranc #+# #+# */
/* Updated: 2017/10/24 12:46:39 by thifranc ### ########.fr */
/* */
/* ************************************************************************** */
#include "libft.h"
int ft_nb_len_base(long long int n, int base)
{
if (0 <= n && n < base)
return (1);
else
return (1 + ft_nb_len_base(n / base, base));
}