笔记
苯和他的C
这个作者很懒,什么都没留下…
展开
-
求结点x在二叉树中的双亲结点算法
#include <stdio.h>#include <stdlib.h>#define N 50//2020真题 struct student{ char name[20]; float score[5]; double average,weighted_average;}stu[N],temp;int main(){ int a,b,c,d,e; void sort(struct student s[]); struct student *p = s原创 2021-12-26 12:55:58 · 1842 阅读 · 2 评论 -
树采用孩兄弟链表作为存储结构,设计非递归算法求树的叶子结点数
#include <stdio.h>#include <stdlib.h>#include <string.h> typedef struct { char class_[20]; int score;}CLASS;int main(){ printf("开始写入2\n"); int i,j,num=0; CLASS t,a[30]; FILE *fp; int no,type,score; int rank[] = {7,5,4,3,2,1原创 2021-12-26 12:50:14 · 337 阅读 · 0 评论 -
【无标题】
#include <stdio.h>#include <stdlib.h>#include <string.h>#define N 500 #define sn 30 //员工人数 /*相当实习了和Excel vlookup函数的功能且功能更多。500条销售数据,30名员工,计算总销售额和总提成,降序排序写入文件。 */ typedef struct{ int no; //员工号 char name[20]; //姓名 float t原创 2021-12-26 12:43:55 · 70 阅读 · 0 评论 -
判别二叉树是否同构。
判别二叉树是否同构。T1.txt和T2.txt文件中的内容如下:7 E - 2D - -B 1 4A 5 6F - -G - 7C - -7A 6 7B 1 3E - 4D - -C - -G - 5F - -#define MaxTree 10#define ElemType char#define Tree int#define Null -1#include <stdio.h>#include &l...原创 2021-05-04 17:18:38 · 347 阅读 · 0 评论