Is there any way to fix this Binary Search Algorithm?

I am trying to make a binary search but it has problems
Was this page helpful?