城区古树名木管理系统Word文档下载推荐.docx
《城区古树名木管理系统Word文档下载推荐.docx》由会员分享,可在线阅读,更多相关《城区古树名木管理系统Word文档下载推荐.docx(57页珍藏版)》请在冰豆网上搜索。
charbaohujibie;
charzaizididian[30];
structprotect*prot_head;
structgushumingmu*gusm_next;
}gusm;
typedefstructchengquxinxi{
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
**3:
loadthecrosslist.**\n
****\n
**4:
traversethecrosslist.**\n
**\n
**
**5:
editthecrosslist**\n
**6:
countandsortthecrosslist**\n
**7:
quitthisprogram**\n
*************************************************\n);
do{
printf(\
\t\tpleasemakeachoice,(1-7)\n);
ch=getchar();
fflush(stdin);
}
while(ch<
'
1'
||ch>
7'
switch(ch)
case'
:
create_cross_list(&
chex_head);
break;
2'
save_cross_list(chex_head);
3'
load_cross_list(&
4'
traverse_cross_list(chex_head);
5'
edit_cross_list();
6'
count();
printf(\areyousureyouhavesavedallthedataandquitit?
\n);
ch1=getchar();
if(ch1=='
y'
||ch1=='
Y'
)
exit(-1);
printf(\Continuemakeachoice?
yesorno?
while(ch=='
||ch=='
}
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:
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);
p_chex->
gusm_head=NULL;
p_chex->
chex_next=hp;
hp=p_chex;
printf(\Continueinputinformationofthethearea?
if(ch=='
gotoloop;
(*chex_head)=hp;
while(p_chex!
=NULL)
/********createinformationofancienttrees*******/
printf(\Create%s'
sancienttrees'
list?
\n,p_chex->
quming);
create_gusm(&
gusm_head,p_chex);
p_chex=p_chex->
chex_next;
voidcreate_gusm(gusm**gusm_head,chex*p_chex)
gusm*hp=NULL,*p_gusm;
/************creategusm**************/
p_gusm=(gusm*)malloc(sizeof(gusm));
printf(\Pleaseinput%s'
newancienttrees'
information:
\n\tsequencenamescience_namegenericage
confirm_timeprotect_levellacation:
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,&
baohujibie,p_gusm->
zaizididian);
strcpy(p_gusm->
quhao);
p_gusm->
prot_head=NULL;
gusm_next=hp;
hp=p_gusm;
printf(\Continueaddancienttreesto%s?
yes