So I've started working on pset3 after a long break, I couldnt even start making a binary search function. Tried to do a linear search function but it doesnt seem to work when i run "./generate 1000 50 | ./find 127"
bool search(int value, int values[], int n)
{
if(n>0)
{
for(int i=0; i<n; i++)
{
if(values[i]==value)
return true;
else
return false;
}
}
else
return false;
return false;
}