files dans srcs sans dossier

This commit is contained in:
Hugo LAMY
2020-02-10 10:25:04 +01:00
parent e9c7619e97
commit 52eaaddb0d
76 changed files with 10 additions and 12 deletions

26
srcs/ft_issort.c Normal file
View File

@@ -0,0 +1,26 @@
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_issort.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: hulamy <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2018/11/16 15:18:14 by hulamy #+# #+# */
/* Updated: 2018/11/16 15:18:15 by hulamy ### ########.fr */
/* */
/* ************************************************************************** */
#include "libft.h"
int ft_issort(int *tab, int length, int (*f)(int, int))
{
int i;
i = -1;
if (!tab)
return (0);
while (++i < length - 1)
if (f(tab[i], tab[i + 1]) > 0)
return (0);
return (1);
}