-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathft_putnchar.c
26 lines (23 loc) · 1.02 KB
/
ft_putnchar.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_putnchar.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: fulldemo <fulldemo@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2019/12/09 13:33:06 by fulldemo #+# #+# */
/* Updated: 2019/12/13 09:02:40 by fulldemo ### ########.fr */
/* */
/* ************************************************************************** */
#include "ft_printf.h"
int ft_putnchar(int i, int j, char a)
{
int n;
n = 0;
while (i < j)
{
n += write(1, &a, 1);
j--;
}
return (n);
}