while((!sign) && (bott <= top))
{
mid=(bott + top)/2;
if(number ==a[mid])
{
local=mid;
printf(“the local is %d\n”,local);
printf(“the number is%d\n”, number);
sign =true;
}
else if(number <a[min])
top = mid -1;
else
bott=mid+1;
}
网友评论