-
Notifications
You must be signed in to change notification settings - Fork 0
/
ft_printunsig.c
26 lines (24 loc) · 1.06 KB
/
ft_printunsig.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
25
26
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_printunsig.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: mmita <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2023/01/07 14:56:20 by mmita #+# #+# */
/* Updated: 2023/01/28 19:18:10 by mmita ### ########.fr */
/* */
/* ************************************************************************** */
#include "ft_printf.h"
void ft_printunsig(unsigned int n, int *i)
{
if (n < 0)
n = -n;
if (n >= 10)
{
ft_printunsig(n / 10, i);
n = n % 10;
}
if (n < 10)
ft_printchar(n + 48, i);
}