资源预览内容
第1页 / 共35页
第2页 / 共35页
第3页 / 共35页
第4页 / 共35页
第5页 / 共35页
第6页 / 共35页
第7页 / 共35页
第8页 / 共35页
第9页 / 共35页
第10页 / 共35页
亲,该文档总共35页,到这儿已超出免费预览范围,如果喜欢就下载吧!
资源描述
#include #include #include typedef struct protectchar quhao7;char bianhao5;char yanghuren20;char riqi11;char cuosi20;char zuangkuang20;struct protect *prot_next; prot; typedef struct gushumingmuchar quhao7;char bianhao5;char name20;char xueming20;char kesu20;int shuling;char querensijian11;char baohujibie;char zaizididian30;struct protect *prot_head;struct gushumingmu *gusm_next; gusm; typedef struct chengquxinxichar quhao7;char quming20;char bumen30;char dizi30;char dianhua13;char fuzeren20;struct gushumingmu *gusm_head;struct chengquxinxi *chex_next; chex; chex *chex_head; void create_cross_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(void); 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(char *,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(char *,int); main() char ch,ch1; printf(“ * n“ “ * * * * *n“ “ * * * * * *n“ “ * * * * * * *n“ “ * * * * * * * n“ “ * * * * *n“ “n“ “ * * * * *n“ “ * * * * * * * *n“ “ * * * * * * * *n“ “ * * * * * * *n“ “ * * * * *n“ “n“);doprintf(“ *n“ * 1:input and creat the cross list. *n“ “ * *n“ * 2:save the cross list. *n“ “ * *n“ * 3:load the cross list. *n“ “ * *n“ * 4:traverse the cross list. *n“ “ * *n“ * 5:edit the cross list *n“ “ * *n“ * 6:count and sort the cross list *n“ “ * *n“ * 7:quit this program *n“ “ *n“);doprintf(“nttplease make a choice,(1-7)n“);ch=getchar();fflush(stdin);while(ch7);switch(ch)case 1:create_cross_list(break;case 2:save_cross_list(chex_head);break;case 3:load_cross_list(break;case 4:traverse_cross_list(chex_head);break;case 5:edit_cross_list();break;case 6:count();break;case 7:printf(“tare you sure you have saved all the data and quit it?n“);ch1=getchar();fflush(stdin);if(ch1=y|ch1=Y)exit(-1);fflush(stdin);printf(“tContinue make a choice?yes or no?n“);ch=getchar();fflush(stdin);while( ch=y|ch=Y); void create_cross_list(chex *chex_head) chex *hp=NULL,*p_chex;char ch;loop: /*create chengqujinbenxinxi*/p_chex=(chex *)malloc(sizeof(chex);printf(“tPlease input information of the area:ntzip_code area_name department address phone 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(“tContinue input information of the the area?yes or no?n“);ch=getchar();fflush(stdin);if(ch=y|ch=Y)goto loop;(*chex_head)=hp;while(p_chex!=NULL) /*create information of ancient trees*/printf(“tCreate %ss ancient trees list?yes or no?n“,p_chex-quming);ch=getchar();fflush(stdin);if(ch=y|ch=Y)create_gusm(p_chex=p_chex-chex_next; void create_gusm(gusm *gusm_head,chex *p_chex) gusm *hp=NULL,*p_gusm;char ch;loop:
收藏 下载该资源
网站客服QQ:2055934822
金锄头文库版权所有
经营许可证:蜀ICP备13022795号 | 川公网安备 51140202000112号