资源描述:
《华科计算机学院C语言课设源代码.doc》由会员上传分享,免费在线阅读,更多相关内容在教育资源-天天文库。
1、#include#include#include#include#include#include#include#defineSUM100/*菜单内容*/char*menu[]={"File",/*文件*/"Edit",/*修改*/"Insert",/*插入*/"Delete",/*删除*/"Query",/*查询*/"Statistic",/*统计*/"Help"};/*将首字母设为红色*/char*red[]={"F","E","I","D"
2、,"Q","S","H"};/*File菜单*/char*F[]={"Create",/*新建*/"Save",/*保存*/"Load",/*载入*/"Exit"};/*删除*//*Edite菜单*/char*E[]={"Province","City","Town"};/*Insert菜单*/char*I[]={"Province","City","Town"};/*Delete菜单*/char*D[]={"Province","City","Town"};/*Query菜单*/char*Q[]={"Province","City","Town"};/*Statisti
3、c菜单*/char*S[]={"Provincemode","Citymode","Townmode"};/*Help菜单*/char*H[]={"About..."};/*缓冲区*/charbuf[18*10*2],buf1[17*2];/*乡镇受灾信息链结点结构*/typedefstructtown{chartown_id[4];/*乡镇编号*/chartown_name[7];/*乡镇名称*/charcity_id[5];/*所属地市编号*/charprov_id[2];/*所属省自治区编号*/floatland_area;/*耕地面积*/floatlake_are
4、a;/*湖泊面积*/intsum3;/*该地市输入的乡镇数*/intvill_num;/*所辖自然村数*/intvill_disa_num;/*受灾自然村数*/intvill_dro_num;/*旱灾自然村数*/intvill_flo_num;/*洪灾自然村数*/intpopu_disa_num;/*受灾人口*/floatdro_area;/*旱灾面积*/floatflo_area;/*洪灾面积*/floatprodro_area;/*抗旱面积*/floatproflo_area;/*抗洪面积*/floatdro_fund;/*抗旱投入资金*/floatflo_fund;
5、/*抗洪投入资金*/floatrelief;/*救济金额*/structtown*next;/*指向下一乡镇的指针*/}town;/*定义结构名*//*地市受灾信息链结点结构*/typedefstructcity{charcity_id[5];/*地市编号*/charcity_name[10];/*地市名称*/charprov_id[2];/*所属省自治区编号*/floatland_area;/*耕地面积*/floatlake_area;/*湖泊面积*/intsum2;/*该省自治区输入的地市数*/inttown_num;/*所辖乡镇数*/inttown_disa_num
6、;/*受灾乡镇数*/inttown_dro_num;/*旱灾乡镇数*/inttown_flo_num;/*洪灾乡镇数*/intpopu_disa_num;/*受灾人口*/floatdro_area;/*旱灾面积*/floatflo_area;/*洪灾面积*/floatprodro_area;/*抗旱面积*/floatproflo_area;/*抗洪面积*/floatdro_fund;/*抗旱投入资金*/floatflo_fund;/*抗洪投入资金*/floatrelief;/*救济金额*/structtown*tnext;/*指向乡镇受灾信息的头指针*/structcit
7、y*next;/*指向下一地市的指针*/}city;/*省自治区受灾信息链结点结构*/typedefstructprov{charprov_id[2];/*省自治区编号*/charprov_name[20];/*省自治区名称*/floatland_area;/*耕地面积*/floatlake_area;/*湖泊面积*/intsum1;/*输入的自治区数*/intcity_num;/*所辖市县数*/intcity_disa_num;/*受灾市县数*/intcity_dro_num;/*旱灾市县数*/intcity_flo_num