//前提数组已经排序好
void find(int tar,int *src,int startpos,int endpos)
{
int pos=(startpos+endpos)/2;
if(startpos==endpos)
cout<<"can't find the target"<<endl;
else if(tar==src[pos])
cout<<"find the target,the pos is "<<pos<<endl;
else if(tar>src[pos])
find(tar,src,pos,endpos);
else if(tar<src[pos])
find(tar,src,0,pos);
}