bool search(int value, int values[], int n) { int middle=(int)((n-1)/2); if(n<0) { return false; } else if(values[middle]==value) { return true; } else if(value
CS50 Stack Exchange is a question and answer site for students of Harvard University's CS50. It only takes a minute to sign up.
Sign up to join this community