-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathft_putunsigned_int.c
More file actions
23 lines (21 loc) · 1.05 KB
/
Copy pathft_putunsigned_int.c
File metadata and controls
23 lines (21 loc) · 1.05 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_putunsigned_int.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: ybounite <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/11/16 17:49:04 by ybounite #+# #+# */
/* Updated: 2024/11/16 18:20:51 by ybounite ### ########.fr */
/* */
/* ************************************************************************** */
#include "ft_printf.h"
int ft_putunsigned(unsigned long n)
{
int res;
res = 0;
if (n >= 10)
res += ft_putunsigned(n / 10);
res += ft_putchar(n % 10 + '0');
return (res);
}