maxishell
Implementation of a shell for Linux-like systems
Loading...
Searching...
No Matches
list_repeat_check_int.c
Go to the documentation of this file.
1/* ************************************************************************** */
2/* */
3/* ::: :::::::: */
4/* list_repeat_check_int.c :+: :+: :+: */
5/* +:+ +:+ +:+ */
6/* By: rocky <marvin@42.fr> +#+ +:+ +#+ */
7/* +#+#+#+#+#+ +#+ */
8/* Created: 2024/04/15 16:36:13 by rocky #+# #+# */
9/* Updated: 2024/04/15 16:41:53 by rocky ### ########.fr */
10/* */
11/* ************************************************************************** */
12
13#include "libft.h"
14
15int list_repeat_check_int(int a[], int size)
16{
17 int i;
18 int j;
19
20 i = 0;
21 while (i < size - 1)
22 {
23 j = i + 1;
24 while (j < size)
25 {
26 if (a[i] == a[j])
27 return (1);
28 j++;
29 }
30 i++;
31 }
32 return (0);
33}
int list_repeat_check_int(int a[], int size)