value Write a function, contains, that accepts an array of integers, the number of elements in the array and an integer value, and returns a boolean value indicating whether the value appears as an element of the array (arrays as parameters, basic search algorithm)

bool contains(int a[], int n, int val)
{
for(int i = 0; i < n; i++)
{
if(a[i] == val)
{
return = true;
}
}
}

what am i doing wrong..