42_push_swap/ft_tablen.c

24 lines
1019 B
C
Raw Permalink Normal View History

2022-11-23 15:44:27 -05:00
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_tablen.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: cchauvet <cchauvet@student.42angouleme.fr +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2022/11/23 16:15:15 by cchauvet #+# #+# */
2022-12-01 11:15:17 -05:00
/* Updated: 2022/12/01 16:51:50 by cchauvet ### ########.fr */
2022-11-23 15:44:27 -05:00
/* */
/* ************************************************************************** */
#include "pushswap.h"
2022-12-01 11:15:17 -05:00
int ft_tablen(unsigned int *tab)
2022-11-23 15:44:27 -05:00
{
int i;
i = 0;
2022-12-01 11:15:17 -05:00
while (tab[i] != STOP_VALUE)
2022-11-23 15:44:27 -05:00
i++;
return (i);
}