基本信息
文件名称:国开电大《数据结构》实验查找.docx
文件大小:156.68 KB
总页数:4 页
更新时间:2025-09-08
总字数:约2.33千字
文档摘要
折半查找
设计程序代码如下:
#includestdio.h
#includestring.h
#defineN5
structstudent{
charname[10];
floatavg;
}
voidinsort(structstudents[],intn)
{
intlow,hight,mid,k;
chary[10];
floatx;
low=1;
hight=n;
数据结构实验报告(五)2
strcpy(y,s[0].name);
x=s[0].avg;
while(low=hight)
{
mid=(low+hight)/2;
if(xs[mid