[求助]折中查询程序.怎么运行没结果的啊
#include <stdio.h>int main()
{
int item[5]={10,11,12,13,14};
int low=0,high=4,x,mid;
scanf("%d",&x);
while(low<=high)
{
mid=(low+high)/2;
if(item[mid]==x)
break;
else if(x>item[mid])
low=mid+1;
else
high=mid-1;
}
return mid;
}
请高手知道下!!!