城区古树名木管理系统.docx

上传人:b****2 文档编号:1004009 上传时间:2022-10-15 格式:DOCX 页数:57 大小:25.87KB
下载 相关 举报
城区古树名木管理系统.docx_第1页
第1页 / 共57页
城区古树名木管理系统.docx_第2页
第2页 / 共57页
城区古树名木管理系统.docx_第3页
第3页 / 共57页
城区古树名木管理系统.docx_第4页
第4页 / 共57页
城区古树名木管理系统.docx_第5页
第5页 / 共57页
点击查看更多>>
下载资源
资源描述

城区古树名木管理系统.docx

《城区古树名木管理系统.docx》由会员分享,可在线阅读,更多相关《城区古树名木管理系统.docx(57页珍藏版)》请在冰豆网上搜索。

城区古树名木管理系统.docx

城区古树名木管理系统

#include#include

#include

typedefstructprotect{

charquhao[7];

charbianhao[5];

charyanghuren[20];

charriqi[11];

charcuosi[20];

charzuangkuang[20];

structprotect*prot_next;

}prot;

typedefstructgushumingmu{

charquhao[7];

charbianhao[5];

charname[20];

charxueming[20];

charkesu[20];

intshuling;

charquerensijian[11];

charbaohujibie;

charzaizididian[30];

structprotect*prot_head;

structgushumingmu*gusm_next;

}gusm;

typedefstructchengquxinxi{

charquhao[7];

charquming[20];

charbumen[30];

chardizi[30];

chardianhua[13];

charfuzeren[20];

structgushumingmu*gusm_head;

structchengquxinxi*chex_next;

}chex;

chex*chex_head;

voidcreate_cross_list(chex**);

voidcreate_gusm(gusm**,chex*);

voidcreate_prot(prot**prot_head,gusm*p_gusm);

intload_cross_list(chex**chex_head);

intsave_cross_list(chex*chex_head);

voidtrav_chex(void);

voidtrav_gusm(gusm*);

voidtrav_prot(prot*);

voidtraverse_cross_list(chex*chex_head);

voidedit_cross_list(void);

voidcount_cross_list(chex*chex_head);

voidmodf_chex(chex**chex_head);

voidmodf_gusm(chex**p);

voidmodf_prot(chex**p);

voiddelt_chex(chex**p);

voiddelt_gusm(chex**p);

voiddelt_prot(chex**p);

voidinst_chex(chex**p);

voidinst_gusm(chex**p);

voidinst_prot(chex**p);

voidcount(void);

intlevl_qcot(char*,char);

intzhuk_qcot(char*,char*);

intkind_qcot(char*,char*);

voidone_levl_cout(void);

voidone_zhuk_cout(void);

voidone_kind_cout(chex*P);

voidtotl_levl_cout(chex*p);

voidtotl_zhuk_cout(void);

voidtotl_kind_cout(chex*p);

voidone_shul_cout(void);

voidtotl_shul_cout(void);

intshul_qcot(char*,int);

main()

{

charch,ch1;

printf(*\n

****************\n

**************\n

********************\n

**************\n

**************************\n

\

******************************\n

****************\n

***********************\n

****************\n

*******************************\n

\

);

do

{

printf(*************************************************\n

**1:

inputandcreatthecrosslist.**\n

****\n

**2:

savethecrosslist.**\n

****\n

**3:

loadthecrosslist.**\n

****\n

**4:

traversethecrosslist.**\n

**\n

**

**5:

editthecrosslist**\n

****\n

**6:

countandsortthecrosslist**\n

****\n

**7:

quitthisprogram**\n

*************************************************\n);

do{

printf(\

\t\tpleasemakeachoice,(1-7)\n);

ch=getchar();

fflush(stdin);

}

while(ch<'1'||ch>'7');

switch(ch)

{

case'1':

create_cross_list(&chex_head);break;

case'2':

save_cross_list(chex_head);break;

case'3':

load_cross_list(&chex_head);break;

case'4':

traverse_cross_list(chex_head);break;

case'5':

edit_cross_list();break;

case'6':

count();break;

case'7':

printf(\areyousureyouhavesavedallthedataandquitit?

\n);

ch1=getchar();

fflush(stdin);

if(ch1=='y'||ch1=='Y')

exit(-1);

}

fflush(stdin);

printf(\Continuemakeachoice?

yesorno?

\n);

ch=getchar();

fflush(stdin);

}

while(ch=='y'||ch=='Y');

}

voidcreate_cross_list(chex**chex_head)

{

chex*hp=NULL,*p_chex;

charch;

loop:

/*******createchengqujinbenxinxi**********/

p_chex=(chex*)malloc(sizeof(chex));

printf(\Pleaseinputinformationofthearea:

\n\tzip_codearea_namedepartmentaddressphone

charman:

\n);

scanf(%s%s%s%s%s%s,p_chex->quhao,p_chex->quming,p_chex->bumen,p_chex->dizi,p_chex->dianhua,p_chex->fuzeren);

fflush(stdin);

p_chex->gusm_head=NULL;

p_chex->chex_next=hp;

hp=p_chex;

printf(\Continueinputinformationofthethearea?

yesorno?

\n);

ch=getchar();

fflush(stdin);

if(ch=='y'||ch=='Y')

gotoloop;

(*chex_head)=hp;

while(p_chex!

=NULL)

/********createinformationofancienttrees*******/

{

printf(\Create%s'sancienttrees'list?

yesorno?

\n,p_chex->quming);

ch=getchar();

fflush(stdin);

if(ch=='y'||ch=='Y')

create_gusm(&p_chex->gusm_head,p_chex);

p_chex=p_chex->chex_next;

}

}

voidcreate_gusm(gusm**gusm_head,chex*p_chex)

{

gusm*hp=NULL,*p_gusm;

charch;

loop:

/************creategusm**************/

p_gusm=(gusm*)malloc(sizeof(gusm));

printf(\Pleaseinput%s'newancienttrees'information:

\n\tsequencenamescience_namegenericage

confirm_timeprotect_levellacation:

\n,p_chex->quming);

scanf(%s%s%s%s%d%s%1s%s,p_gusm->bianhao,p_gusm->name,p_gusm->xueming,p_gusm->kesu,&p_gusm->shuling,p_gusm->querensijian,&p_gusm->baohujibie,p_gusm->zaizididian);

fflush(stdin);

strcpy(p_gusm->quhao,p_chex->quhao);

p_gusm->prot_head=NULL;

p_gusm->gusm_next=hp;

hp=p_gusm;

printf(\Continueaddancienttreesto%s?

yes

展开阅读全文
相关资源
猜你喜欢
相关搜索

当前位置:首页 > 解决方案 > 学习计划

copyright@ 2008-2022 冰豆网网站版权所有

经营许可证编号:鄂ICP备2022015515号-1