【带错误的源代码】 #include int main(void) { int a[10] = { 2,5,6,8,11,15,18,22,60,88 }; int low, high, m, i, x; scanf("%f", &x); low = 0; high = 9; while (low > high) { m = (low + high) / 2; if (x == a[m]) break; else if (x > a[m]) high = m + 1; else low = m - 1; } if (low <= high) printf("%d is found, the position is %d", x, m); else printf("%d is not found\n", x); return 0; }