Not getting output

this is the code for binary search. i am not getting output.
please tell my wrong approach of my code

There were some minor errors.Check now.