数据结构课程设计电子书
Ⅰ 数据结构课程设计
#include<stdio.h>
#include<conio.h>
seq_search()
{
int a[10],i,k;
printf("please input ten number");
for(i=0;i<10;i++)
scanf("%d",&a[i]);
printf("please input the key for search");
scanf("%d",&k);
for(i=0;i<10;i++)
{
if(a[i]==k)
{printf("sucess! number is %d",i+1);
return(0);}
printf("failure");
return(0);}}
half_search()
{
int mid,low,high;
int b[10],m,key,h;
printf("please input ten number:");
for(m=0;m<10;m++)
scanf("%d",&b[m]);
printf("please input the key for search:");
scanf("%d",&h);
low=0;
high=9;
while(low<=high)
{mid=(low+high)/2;
if(b[mid]>h) high=mid-1;
else {if(b[mid]<h) low=mid+1;
else {printf("sucess!");
return(0);}
}
}
printf("failure!");
}
main()
{
int a[10],k,i;
clrscr();
printf("1.seq_search;");
printf("2.half_search;");
printf("please input your choice:1 or 2");
scanf("%d",&i);
if(i==1) seq_search();
else half_search();
}
Ⅱ 数据结构课程设计
亲,你也是中南的么?
Ⅲ 求数据结构课程设计完整
数据结构课程设计要原创吗,我可为您操作.
Ⅳ 求 数据结构课程设计
用C++写一个类, list, stack, tree或者其他都可以,网上很多数据结构的代码了,随版便照抄都行。http://code.ddvip.com/
如果嫌规模小了,就多写几个这样的权类,把它做成一个库,考试过关没什么问题了。
如果你自己写出了这些,你的水平就提高很多了。
我以前就这么做,代码写的比较完善,分数还可以,90多。