1、 char baohujibie; char zaizididian30; struct protect *prot_head; struct gushumingmu *gusm_next;gusm;typedef struct chengquxinxi char quming20; char bumen30; char dizi30; char dianhua13; char fuzeren20; struct gushumingmu *gusm_head; struct chengquxinxi *chex_next;chex;chex *chex_head;void create_cro
2、ss_list(chex *);void create_gusm(gusm *,chex *);void create_prot(prot *prot_head,gusm *p_gusm);int load_cross_list(chex *chex_head);int save_cross_list(chex *chex_head);void trav_chex(void);void trav_gusm(gusm *);void trav_prot(prot *);void traverse_cross_list(chex *chex_head);void edit_cross_list(v
3、oid);void count_cross_list(chex *chex_head);void modf_chex(chex *chex_head);void modf_gusm(chex *p);void modf_prot(chex *p);void delt_chex(chex *p);void delt_gusm(chex *p);void delt_prot(chex *p);void inst_chex(chex *p);void inst_gusm(chex *p);void inst_prot(chex *p);void count(void);int levl_qcot(c
4、har *,char);int zhuk_qcot(char *,char *);int kind_qcot(char *,char *);void one_levl_cout(void);void one_zhuk_cout(void);void one_kind_cout(chex *P);void totl_levl_cout(chex *p);void totl_zhuk_cout(void);void totl_kind_cout(chex *p);void one_shul_cout(void);void totl_shul_cout(void);int shul_qcot(cha
5、r *,int);main() char ch,ch1; printf( * n * * * * *n * * * * * *n * * * * * * *n * * * * * * * n * * * * *n * * * * *n * * * * * * * *n * * * * * * * *n * * * * * * *n * * * * *n ); do printf( *n * 1:input and creat the cross list. *n * *n * 2:save the cross list. *n * 3:load the cross list. *n * *n
6、* 4:traverse the cross list. *n *n * * 5:edit the cross list *n * 6:count and sort the cross list *n * 7:quit this program *n *n); do printf(ttplease make a choice,(1-7)n); ch=getchar(); fflush(stdin); while(ch7 switch(ch) case :create_cross_list(&chex_head);break;2save_cross_list(chex_head);3load_c
7、ross_list(&4traverse_cross_list(chex_head);5edit_cross_list();6count(); printf( are you sure you have saved all the data and quit it?n); ch1=getchar(); if(ch1=y|ch1=Y) exit(-1); printf( Continue make a choice?yes or no? while( ch=|ch= void create_cross_list(chex *chex_head) chex *hp=NULL,*p_chex; ch
8、ar ch; loop:/*create chengqujinbenxinxi*/ p_chex=(chex *)malloc(sizeof(chex); printf( Please input information of the area:ntzip_code area_name department address phone 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
9、; p_chex-chex_next=hp; hp=p_chex; printf( Continue input information of the the area? if(ch= goto loop; (*chex_head)=hp; while(p_chex!=NULL) /*create information of ancient trees*/ printf( Create %ss ancient trees list?n,p_chex-quming); create_gusm(&gusm_head,p_chex); p_chex=p_chex-chex_next;void cr
10、eate_gusm(gusm *gusm_head,chex *p_chex) gusm *hp=NULL,*p_gusm;/*create gusm*/ p_gusm=(gusm *)malloc(sizeof(gusm); printf( Please input %s new ancient trees information: ntsequence name science_name generic age confirm_time protect_level lacation: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( Continue add ancient trees to %s?yes
copyright@ 2008-2022 冰豆网网站版权所有
经营许可证编号:鄂ICP备2022015515号-1