-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathft_putuns.c
More file actions
29 lines (26 loc) · 1.1 KB
/
ft_putuns.c
File metadata and controls
29 lines (26 loc) · 1.1 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
29
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_putuns.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: mu <mu@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2022/11/23 18:27:30 by mu #+# #+# */
/* Updated: 2022/11/23 18:39:15 by mu ### ########.fr */
/* */
/* ************************************************************************** */
#include "ft_printf.h"
int ft_putuns(unsigned int n)
{
int total_written;
total_written = 0;
ft_putnbr_unsigned_int(n);
if (n == 0)
total_written++;
while (n != 0)
{
n /= 10;
total_written++;
}
return (total_written);
}