How to set the logic for binary search program

welcome to shbcf.ru