piscine/c11/ex00/ft_foreach.c
Willem Haffmans 607ce08c18 all
2024-09-10 00:18:01 +02:00

24 lines
1016 B
C

/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_foreach.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: whaffman <whaffman@student.codam.nl> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/06/23 10:34:34 by whaffman #+# #+# */
/* Updated: 2024/06/23 10:39:33 by whaffman ### ########.fr */
/* */
/* ************************************************************************** */
void ft_foreach(int *tab, int length, void(*f)(int))
{
int i;
i = 0;
while (i < n)
{
tab[i] = f(tab[i]);
i++;
}
}