-
Notifications
You must be signed in to change notification settings - Fork 0
/
ch_is_duplicated_bonus.c
24 lines (21 loc) · 1.03 KB
/
ch_is_duplicated_bonus.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ch_is_duplicated_bonus.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: nkawaguc <nkawaguc@student.42tokyo.jp> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/10/20 12:55:13 by nkawaguc #+# #+# */
/* Updated: 2024/10/20 12:57:21 by nkawaguc ### ########.fr */
/* */
/* ************************************************************************** */
#include "ch_bonus.h"
int is_duplicated(int *arr, int size)
{
int i;
i = 0;
while (++i < size)
if (arr[i - 1] == arr[i])
return (TRUE);
return (FALSE);
}