#include<stdio.h> int search(int a[], int size, int key)//定义一个二分法查找的函数 { int low = 0; int high = size - 1; int index = -1;//若查找失败则返回-1 while (low <= high) { int mid = (low + high) / 2;//找出中间的值进行比较 if (key > a[mid])//如果要找的数比中间值大则要改变low { low = mid + 1; } else if (key <...