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

Go to the source code of this file.

Functions

int find_max_in_list (int a[], int size)
 

Function Documentation

◆ find_max_in_list()

int find_max_in_list ( int  a[],
int  size 
)

Definition at line 15 of file find_max_in_list.c.

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}