-
Notifications
You must be signed in to change notification settings - Fork 0
/
ft_printf_unsigned.c
25 lines (22 loc) · 1.08 KB
/
ft_printf_unsigned.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
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_printf_unsigned.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: dalcabre <dalcabre@student.42urduliz.co +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/02/08 11:04:53 by dalcabre #+# #+# */
/* Updated: 2024/02/08 11:18:40 by dalcabre ### ########.fr */
/* */
/* ************************************************************************** */
#include "ft_printf.h"
int ft_printf_unsigned(unsigned long n)
{
int length;
length = 0;
if (n >= 10)
length += ft_printf_number(n / 10);
ft_printf_char((n % 10) + '0');
length++;
return (length);
}