2023-10-25 13:56:45 +02:00
|
|
|
/* ************************************************************************** */
|
|
|
|
/* */
|
|
|
|
/* :::::::: */
|
2023-10-26 19:11:30 +02:00
|
|
|
/* ft_luilen.c :+: :+: */
|
2023-10-25 13:56:45 +02:00
|
|
|
/* +:+ */
|
|
|
|
/* By: djonker <marvin@codam.nl> +#+ */
|
|
|
|
/* +#+ */
|
|
|
|
/* Created: 2020/11/13 02:04:46 by djonker #+# #+# */
|
2023-10-26 19:11:30 +02:00
|
|
|
/* Updated: 2023/10/18 16:59:56 by houtworm ######## odam.nl */
|
2023-10-25 13:56:45 +02:00
|
|
|
/* */
|
|
|
|
/* ************************************************************************** */
|
|
|
|
|
|
|
|
#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);
|
|
|
|
}
|