摘要: 1 #include<stdio.h> 2 #include<math.h> 3 struct Complex { 4 double a;//实部 5 double b;//虚部 6 }; 7 void initComplex(double x, double y) { 8 printf("%.2f 阅读全文
posted @ 2020-03-04 22:45 shanlu 阅读(613) 评论(0) 推荐(0) 编辑
摘要: 1 #include<stdio.h> 2 #include<stdlib.h> 3 #define Capacity1 10 4 #define Capacity2 5 5 struct List { 6 int* ElemSet; 7 int len; 8 int capacity; 9 }li 阅读全文
posted @ 2020-03-04 19:56 shanlu 阅读(321) 评论(0) 推荐(0) 编辑
摘要: 操作步骤: 1,求两个线性表的长度 2,从线性表LB中依次察看每个数据元素:GetElem(LB,i) -> e 3,依次在线性表LA中进行查仿:LocateElem(LA,e, equal()) 4,若不存在,则插入之。ListInsert(LA,n+1, e) 1 #include<stdio. 阅读全文
posted @ 2020-03-04 19:18 shanlu 阅读(112) 评论(0) 推荐(0) 编辑
摘要: 顺序表基本操作实现 1 #include<stdio.h> 2 #define Capacity 5 3 4 //自定义顺序表 5 struct List{ 6 int* ElemSet;//声明了一个名为ElemSet的长度不确定的数组,也叫“动态数组” 7 int len; //顺序表的长度 8 阅读全文
posted @ 2020-03-04 13:09 shanlu 阅读(167) 评论(0) 推荐(0) 编辑