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