题目内容
请将代码补充完整。01 #include 02 #define N 10003 int main()04 {05 int n, key,nums[N];06 scanf("%d%d", &n,&key);07 for (int i = 0; i < n; i++)08 scanf("%d", &nums[i]);09 int mid, low = 0, high = n - 1;10 while ()11 {12 mid =;1314 if (key == nums[mid]) break;15 else if (key < nums[mid]) high = mid - 1;16 else ;17 }18 if () printf("not found\n");19 else printf("found\n");20 return 0;21 }
查看答案
搜索结果不匹配?点我反馈
更多问题