-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathft_putunbr.c
More file actions
21 lines (19 loc) · 1.04 KB
/
Copy pathft_putunbr.c
File metadata and controls
21 lines (19 loc) · 1.04 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_putunbr.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: tchevrie <tchevrie@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2022/09/12 18:10:03 by tchevrie #+# #+# */
/* Updated: 2022/10/05 05:35:24 by tchevrie ### ########.fr */
/* */
/* ************************************************************************** */
#include "ft_printf.h"
size_t ft_putunbr(const unsigned int n)
{
if (n / 10)
return (ft_putunbr(n / 10) + ft_putunbr(n % 10));
else
return (ft_putchar(n + '0'));
}