错误代码
int BinarySearch(int A[], int start, int end, int x){
/***********以下编写你的代码********************/
int mid,t,n=end-start+1;
if(n<=0)
return -1;
else
{
mid=n/2;
if(A[mid]==x)
return mid;
else if(x<A[mid])
return BinarySearch(A,start,mid-1,x);
else{
t=BinarySearch(&A[n+mid+1],mid-1,end,x);
return (t==1)?-1:mid+1+t;
}
}
/**********************************************/
}