-
Notifications
You must be signed in to change notification settings - Fork 0
/
ft_printf_unit.c
24 lines (21 loc) · 1.06 KB
/
ft_printf_unit.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
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_printf_unit.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: jikarunw <jikarunw@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2023/09/18 00:22:26 by jikarunw #+# #+# */
/* Updated: 2023/09/18 15:15:01 by jikarunw ### ########.fr */
/* */
/* ************************************************************************** */
#include "ft_printf.h"
int ft_printf_unit(unsigned int n)
{
int digit;
digit = 0;
if (n > 9)
digit += ft_printf_unit((n / 10));
digit += ft_printf_char((n % 10) + 48);
return (digit);
}