-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathprintf_uint.c
24 lines (21 loc) · 1.09 KB
/
printf_uint.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
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* printf_uint.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: mheinke <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2023/08/03 10:58:50 by mheinke #+# #+# */
/* Updated: 2023/08/17 09:43:45 by mheinke ### ########.fr */
/* */
/* ************************************************************************** */
#include "ft_printf.h"
int printf_uint(unsigned int n)
{
int digit_counter;
digit_counter = 0;
if (n > 9)
digit_counter += printf_uint((n / 10));
digit_counter += printf_char((n % 10) + 48);
return (digit_counter);
}