-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathft_putunbr.c
More file actions
30 lines (27 loc) · 1.09 KB
/
ft_putunbr.c
File metadata and controls
30 lines (27 loc) · 1.09 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
30
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_putunbr.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: miissa <miissa@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2025/11/18 12:59:40 by miissa #+# #+# */
/* Updated: 2025/11/18 12:59:40 by miissa ### ########.fr */
/* */
/* ************************************************************************** */
#include "ft_printf.h"
int ft_putunbr(unsigned int n)
{
int count;
count = 0;
if (n > 9)
{
count += ft_putunbr(n / 10);
count += ft_putunbr(n % 10);
}
else
{
count += ft_putchar(n + '0');
}
return (count);
}