您的位置:首页 > 其它

顺序查找

2016-02-13 11:35 316 查看
#include<stdio.h>
#include<stdlib.h>
int shunxuchazhao(int *a,int low,int high,int value)
{
int i;
for(i=low;i<high;i++)
{
if(a[i]==value)
return i;
}
return 0;
}
void main()

{
int j;
int b[9]={4,88,666,9999,6666,3333,7777,44444,55555};
j=shunxuchazhao(&b[0],0,9,88);
printf("%d",j);
system("pause");

}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: