Staircase algorithm

my code is working properly in the case if the key is present in the array,it is detetcing the key but if the key is not present in the array it is not showing key not found

send me the code link then only can i debugg