求 完整源代码 严蔚敏 数据结构c言语版 吴伟民编著 (求完整源代码的函数)
创始人
2026-05-15 09:41:19
0

本文目录导航:

  • 求 《数据结构c言语版》 完整源代码(严蔚敏、吴伟民编著)
  • 完整源代码 c言语数据结构。长度为11的有序表,驳回折半查找,在等概率状况下查找完成的平均查找长度为?请给出详
  • 数据结构 课程设计C言语版 自己现..跪求一道课程设计答案 有哪..位的大仙帮帮我,如今只能给100分,完了追

求 《数据结构c言语版》 完整源代码(严蔚敏、吴伟民编著)

整顿严蔚敏所有数据结构资料:包含电子书、习题集答案、纯C代码、教学讲义和课件.还有数据结构笔记和数据结构1800温习例题与答案。下载地址1:下载地址2:下载地址3:这个 地址你去下载把 CSDN

c言语数据结构。长度为11的有序表,驳回折半查找,在等概率状况下查找完成的平均查找长度为?请给出详

一命击中的长度为1

两次击中的长度为2

三次击中的长度为4

四次击中的长度为8

五次击中的长度为16

所以,长度为11的有序表的平均查找次数约为5。

裁减资料:

首先,假定表中元素是按升序陈列,将表两边位置记载的主要字与查找主要字比拟,假设两者相等,则查找完成;否则应用两边位置记载将表分红前、后两个子表,假设两边位置记载的主要字大于查找主要字,则进一步查找前一子表,否则进一步查找后一子表。

重复以上环节,直到找到满足条件的记载,使查找完成,或直到子表不存在为止,此时查找不完成。

数据结构 课程设计C言语版 自己现..跪求一道课程设计答案 有哪..位的大仙帮帮我,如今只能给100分,完了追

#include stdio.h# include bios.h#include dos.h#include conio.h #include stdlib.h #include string.h#include mem.h#include ctype.h #include alloc.htypedef struct z1{ char no[11]; char name[15]; float jbgz; float koukuan; float yfgz; float shuijin; float sfgz; struct z1 *prior; struct z1 *next;}SALARY; struct z1 *First; struct z1 *Last; void init();void create();void calc(); void delete(); void search(); void save();void load();void computer(); void insert();void append(); void copy(); void sort();void index();void total();void list(); void print(SALARY *p);void display();float fax(float x);int menu_select();main(){ int i; clrscr(); for(;;) {switch(menu_select()) {case 0:init();break;case 1:create();break; case 2:list();break;case 3:display();break;case 4:calc();break;case 5:search();break;case 6:delete();break;case 7:insert();break;case 8:append();break;case 9:save();break;case 10:load(); break;case 11:copy();break;case 12:sort();break;case 13:computer();break; case 14:index();break;case 15:total();break;case 16:exit(0);} }}menu_select(){ char *f[]= { **************MENU*************, 0. init list, 1. Enter list, 2. List all \n, 3. Display record by step, 4. Calc the salary, 5. Search record on name, 6. Delete a record, 7. Insert record to list, 8. Appendrecord to file, 9. Save){ flag=1; break;} gotoxy(13,8+x);inputs(info->name,14); gotoxy(30,8+x); scanf(%f,&temp); info->jbgz=temp; info->koukuan=0; info->sfgz=0; info->shuijin=0; info->yfgz=0; if(p==NULL){ First=Last=info; First->prior=NULL; Last->next=NULL; }else { info->next=p; info->prior=p->prior; p->prior=info;}p=info;First=info; x+=2; gotoxy(1,8+x);i++; if(i%9==0) break; }gotoxy(1,8+x); } printf(|----------|----------------|--------|);}inputs(char *s, int count){ char p[255]; do{scanf(%s,p);if(strlen(p)>count)printf(\n too long! \n); }while(strlen(p)>count); strcpy(s,p); }void list(){ int i=0,n; SALARY *p; clrscr(); p=First; while(i%10==0&&p!=NULL) {i=0; clrscr(); printf(\n\n\n); printf(*************************************SALARY***********************************\n); printf(|nO|name | jbgz| koukuan | yfgz| shuijin | sfgz|\n);printf(|----------|---------------|---------|---------|---------|---------|---------|\n);while(p!=NULL){printf(|%-10s|%-15s|%9.2f|%9.2f|%9.2f|%9.2f|%9.2f|\n,p->no,p->name,p->jbgz,p->koukuan,p->yfgz,p->shuijin,p->sfgz);p=p->next;i++; if(i%10==0) break;}printf(****************************************end***********************************\n);printf(Press any key congtinue...\n);getch(); }}void display(){ int ch; SALARY *p; clrscr(); p=First; if(p==NULL) {printf(record is empty!\n);return; } else {print(p); for(;;){printf(\n\n0. Quit 1. \n\n);printf(\nplease select 0~4:); scanf(%d,&ch); if(ch==0) break;switch(ch) { case 1:p=p->prior;if(p==NULL)p=First;break; case 2:p=p->next;if(p==NULL) p=Last;break; case 3:p=First;break; case 4:p=Last;break; }print(p);} }}void print(SALARY *p){ if(p) {clrscr();printf(\n\n\n);printf(************************************SALARY************************************\n);printf(|no|name | jbgz| koukuan| yfgz| shuijin | sfgz |\n); printf(|----------|---------------|---------|---------|---------|---------|---------|\n); printf(|%-10s|%-15s|%9.2f|%9.2f|%9.2f|%9.2f|%9.2f|\n, p->no,p->name,p->jbgz,p->koukuan,p->yfgz,p->shuijin,p->sfgz);printf(***************************************end***************************** *******\n); }}void calc(){ int x; int i=0; float temp; SALARY *p; clrscr(); p=First; while(p!=NULL) {x=0;clrscr();gotoxy(1,3);printf(***************************gongziguanli************************************); gotoxy(1,5);printf(|--------------------------------------------------------------------------|);gotoxy(1,6);printf(|no|name|jbgz|koukuan |yfgz|shuijin |sfgz|);while(p!=NULL) {gotoxy(1,7+x);printf(|----------|----------------|--------|----------|--------|--------|--------|);gotoxy(1,8+x);printf(|);gotoxy(12,8+x);printf(|);gotoxy(29,8+x);printf(|);gotoxy(38,8+x);printf(|);gotoxy(49,8+x);printf(|);gotoxy(58,8+x);printf(|);gotoxy(67,8+x);printf(|);gotoxy(76,8+x);printf(|);gotoxy(2,8+x);printf(%-10s,p->no); gotoxy(13,8+x);printf(%-15s,p->name); gotoxy(30,8+x);printf(%.2f,p->jbgz);gotoxy(39,8+x);scanf(%f,&temp);p->koukuan=temp; p->yfgz=p->jbgz-p->koukuan; gotoxy(50,8+x);printf(%.2f,p->yfgz);gotoxy(59,8+x);p->shuijin=(p->yfgz-1000)*fax(p->yfgz); printf(%.2f,p->shuijin);gotoxy(68,8+x);p->sfgz=p->yfgz-p->shuijin;printf(%-8.2f,p->sfgz);x+=2; i++; if(i%9==0)break;p=p->next; }gotoxy(1,7+x);printf(|----------|----------------|--------|----------|--------|--------|--------|\n); printf(Press any key congtinue...\n);getch(); }}float fax(float x){ float f1; if(x<1000)return 0; switch((int)(x/1000)) {case 1:f1=0.05;break; case 2:f1=0.1;break; case 3:f1=0.15;break; case 4:f1=0.2;break; default:f1=0.3;break; } return f1;}void computer(){ SALARY *p; int i=0,a[7]={0},t100,t50,t20,t10,t5,t2,t1; float t; p=First; while(p!=NULL) {t100=(int)p->sfgz/100;a[0]=a[0]+t100; t=p->sfgz-t100*100; t50=(int)(t/50); a[1]=a[1]+t50; t=t-t50*50; t20=(int)(t/20); a[2]=a[2]+t20; t=t-t20*20; t10=(int)(t/10); a[3]=a[3]+t10; t=t-t10*10; t5=(int)(t/5); a[4]=a[4]+t5; t=t-t5*5; t2=(int)(t/2); a[5]=a[5]+t2; t=t-t2*2; t1=(int)(t); a[6]=a[6]+t1; p=p->next; } clrscr(); printf(\n\n\n***********ticket number***************\n); printf(--100-----50------20-----10-----5------2------1------\n); for(i=0;i<7;i++)printf(%5d,a[i]); printf(\n);}SALARY *find(char *no){ SALARY *p; p=First; while(p) {if(!strcmp(no,p->no))return p; p=p->next; } printf(not found\n); return NULL; }

相关内容

热门资讯

推... 工作的时候我们总是需要处理各种格式,难道要用不同的软件来制作不同的格式吗?太麻烦了!本文就给大家推荐...
c... 点击左上角好机友摄影1DXM2*5D4*EOS R*A7R3*A7M3*Z7*D850*D810*等...
产... 这是新产品开发者成长的聚集地▼2016.11.12|第13期使用过多种工具但仍然无法提高效率使用了很...
多... 上周,Blue Friday 发布了一篇关于管理多个账户并防止指纹识别的浏览器的评论。此次评测主要对...
P... 最近,我在将 PDF 文件转换为 Word 文档时,发现转换后的 Word 文档内容全都是乱码pdf...
用... 本文目录导航: 用户体验5要素 完整的用户体验要素蕴含哪些 ...
带... 本文目录导航: 带你了解什么是用户体验设计师 UI设计师的上班职能都有哪些...
需... 本文目录导航: 需求剖析包含哪些方面 [浅谈软件开发需求剖析阶段的关键义务...
可... 本文目录导航: 大神们,我最近也要学数据结构C言语版,可是看严蔚敏的视频真实看不下去,不知...
打... 本文目录导航: 消费者保养权力揭发电话12315 1. 市长热线 - 无论何时何地,任...
贵州百年黔庄酒业集团有限公司的...   购买贵州百年黔庄酒业原始股被骗了怎么办?买酒送股权忽悠投资人!  骗子们通过制造多赚少赔的假象诱...
在... 本文目录导航: 在成功DevOps的时刻,继续集成和继续交付这一块,有哪些须要特意留意的?...
怎... 本文目录导航: 怎样恢复损坏的SQL Server数据文件 sql ser...
数... 本文目录导航: 数据库中的数据删除后还能复原吗 如何复原49图库数据库文件...
供... 本文目录导航: 供热采暖系统节能模式有哪些 以下哪些是云数据核心空调冷水系...
俄... 本文目录导航: 请问一下,俄罗斯包含哪些共和国和哪些州?其行政区划如何? ...
钢... 本文目录导航: 钢架移门衣柜框架怎样做 衣柜门做烤漆还是模压(模压门和烤漆...
经... 经常出现的数据库治理系统重要有以下几种:Oracle>数据库治理系统有哪些 数据库治理系统(Da...
对... 本文目录导航: 对于包全环境的手抄报 保护卫熟手抄报图片 ...
环... 本文目录导航: 环境卫熟手抄报内容 创卫手抄报内容 创卫手...