課程設計備份

2021-06-21 10:56:40 字數 1517 閱讀 6169

#include

#include

#include

#include

#define size 100

#define increase 10

struct nodel;

/順序表

typedef struct tree*btree,bnode;

二叉樹struct stackt;

棧int caidan();

int initline(struct node &l);//初始化順序表

int initstack(struct stack &t);//初始化棧

int lineinsert(int e,struct node &l);//入順序表

void creattree(btree &p);//建立二叉樹

btree inserttree(btree p,int key);//搜尋二叉樹

//int inorder(btree &p);//中序遍歷

int zxbl(btree p);//中序遍歷

void push(struct stack &t,struct tree *e);//入棧

void pop(struct stack &t,struct tree *(&e));//取棧頂元素

int main()

printf("\n\t生成的排序表為:");

for(i=0;i

printf("%d ",l.data[i]);

printf("\n");

}if(k==2)

if(k==3)

if(k==4)

}//inorder(p);

system("pause");

return 0;

}int initline(struct node &l)

int lineinsert(int e,struct node &l)

///void creattree(btree &p)

}btree inserttree(btree p,int key)

s=(btree)malloc(sizeof(bnode));

s->data=key;

//printf("%d ",key);

s->lchild=null;

s->rchild=null;

if(p==null) return s;

if(keydata) f->lchild=s;

else f->rchild=s;

return p;

}int initstack(struct stack &t)

void push(struct stack &t,struct tree *e)

void pop(struct stack &t,struct tree *(&e))

int zxbl(btree p)

return 0;

}int caidan()

課程設計表

create database drug 藥品表 create table drug did nvarchar 10 primary key,dname nvarchar 50 not null,dimage nvarchar 100 not null,dmodel nvarchar 10 chec...

課程設計總結

課程設計今天終於完了,答辯之後感悟挺多的,一方面,覺得自己的努力獲到了應有的成果,當然也有很多不足及未完成的地方 另一方面,看到很多其他同學好的設計及思想。覺得很多方面都值得自己學習,自己還有很多方面都很欠缺,本次課程設計我和兩個同學共三個人做了聊天程式,仿qq做的。聊天軟體,是我之前一直想完成的乙...

課程設計報告

c 程式設計 課程設計報告 一problem b 題意 輸出所有在給定範圍內的水仙花數 水仙花數是乙個三位數,它的各位數字的立方和等於其本身 解題思路 用while語句輸入多組資料,首先用for語句迴圈給定範圍的每乙個數,接著把個十百位數表示出來,用if語句進行判斷。細節處理 每一組資料的輸出要換行...