29 lines
1.0 KiB
C
29 lines
1.0 KiB
C
|
/* ************************************************************************** */
|
||
|
/* */
|
||
|
/* :::::::: */
|
||
|
/* ft_luilen.c :+: :+: :+: */
|
||
|
/* +:+ */
|
||
|
/* By: djonker <marvin@codam.nl> +#+ */
|
||
|
/* +#+ */
|
||
|
/* Created: 2020/11/13 02:04:46 by djonker #+# #+# */
|
||
|
/* Updated: 2023/02/07 00:40:35 by houtworm ### ########.fr */
|
||
|
/* */
|
||
|
/* ************************************************************************** */
|
||
|
|
||
|
#include "../libft.h"
|
||
|
|
||
|
int ft_luilen(unsigned long long n)
|
||
|
{
|
||
|
int l;
|
||
|
|
||
|
l = 0;
|
||
|
if (n == 0)
|
||
|
return (1);
|
||
|
while (n != 0)
|
||
|
{
|
||
|
n = n / 10 + (l * 0);
|
||
|
l++;
|
||
|
}
|
||
|
return (l);
|
||
|
}
|