-
Notifications
You must be signed in to change notification settings - Fork 0
/
ft_lenx.c
28 lines (25 loc) · 1.02 KB
/
ft_lenx.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
27
28
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_lenx.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: okimdil <okimdil@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2019/11/19 19:33:56 by okimdil #+# #+# */
/* Updated: 2019/11/19 19:33:58 by okimdil ### ########.fr */
/* */
/* ************************************************************************** */
#include "ft_printf.h"
int ft_lenx(unsigned int n)
{
int i;
i = 0;
if (n == 0)
return (1);
while (n > 0)
{
n /= 16;
i++;
}
return (i);
}