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