user
Write a function to find the maximum element of a given array.

int array[] = {8, 3, 5, 9, 3, 1, 5};


assistant
int findMax(int array[])
{
    int max = array[0];
    for (int i = 1; i < sizeof(array)/sizeof(array[0]); i++)
    {
        if (array[i] > max)
            max = array[i];
    }
    return max;
}