int FindKey(int m[],int n,int nValue)
{
int nFirst = 0;
int nSecond = n;
int nMid = (nFirst+nSecond)/2;
while (m[nMid] != nValue){
if (m[nMid] > nValue){
nSecond = nMid;
}
else{
nFirst = nMid;
}
nMid = (nFirst+nSecond)/2;
}
return nMid;
}