maxishell
Implementation of a shell for Linux-like systems
Loading...
Searching...
No Matches
list_repeat_check_int.c File Reference
#include "libft.h"
Include dependency graph for list_repeat_check_int.c:

Go to the source code of this file.

Functions

int list_repeat_check_int (int a[], int size)
 

Function Documentation

◆ list_repeat_check_int()

int list_repeat_check_int ( int  a[],
int  size 
)

Definition at line 15 of file list_repeat_check_int.c.

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}