-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathft_unsigned_nbr_len_bonus.c
More file actions
28 lines (25 loc) · 1.05 KB
/
Copy pathft_unsigned_nbr_len_bonus.c
File metadata and controls
28 lines (25 loc) · 1.05 KB
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_unsigned_nbr_len_bonus.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: obouizi <obouizi@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/12/01 14:18:34 by obouizi #+# #+# */
/* Updated: 2024/12/05 20:50:01 by obouizi ### ########.fr */
/* */
/* ************************************************************************** */
#include "libftprintf_bonus.h"
int ft_unsigned_nbr_len(unsigned int nb)
{
int len;
if (nb == 0)
return (1);
len = 0;
while (nb != 0)
{
nb /= 10;
len++;
}
return (len);
}