用c语言编写管理联络方式的小系统

用c语言编写管理联络方式的小系统

ID:14260045

大小:44.00 KB

页数:18页

时间:2018-07-27

用c语言编写管理联络方式的小系统_第1页
用c语言编写管理联络方式的小系统_第2页
用c语言编写管理联络方式的小系统_第3页
用c语言编写管理联络方式的小系统_第4页
用c语言编写管理联络方式的小系统_第5页
资源描述:

《用c语言编写管理联络方式的小系统》由会员上传分享,免费在线阅读,更多相关内容在行业资料-天天文库

1、用C语言编写管理联络方式的小系统#include#include#include#defineLENsizeof(structlinkinfo)structlinkinfo{structlinkinfo*first;charname[20];charplace[128];charbirthday[11];chartelephone[16];structlinkinfo*next;};intdatacount=0,sortname,sorttype;structlinkinfo*p_main,*p_first=N

2、ULL,*p_tail=NULL;intcheckempty(chartemp[]){intflag=0,i;if(strlen(temp)==0)flag=1;for(i=0;i

3、

4、(int)temp[i]==129){flag=1;}elseflag=0;}return(flag);}structlinkinfo*create(intnumber){structlinkinfo*new;inti,flag=0;chartemp[20];for(i=0;i

5、structlinkinfo*)malloc(LEN);fflush(stdin);printf("Pleaseinputname:");gets(new->name);strcpy(temp,new->name);flag=checkempty(temp);if(flag==1){free(new);break;}printf("Pleaseinputplace:");gets(new->place);printf("pleaseinputbirthday:");gets(new->birthday);printf("Pleaseinputtelephone:");

6、gets(new->telephone);new->next=NULL;new->first=NULL;if(p_first==NULL){p_first=new;}else{new->first=p_tail;p_tail->next=new;}p_tail=new;datacount++;}}voidshowtopmenu(){fflush(stdin);printf("*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-Menu-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-**");printf("1add*");prin

7、tf("2update*");printf("3delete*");printf("4showall*");printf("5showone*");printf("6sort*");printf("------------------------------------------------------------------------*");printf("7readdatafromfile*");printf("8writedatatofile*");printf("-------------------------------

8、-----------------------------------------*");printf("0exit*");printf("*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*");printf("Pleasechoiceacommand>>");}voidprocess_add(){create(1);showtopmenu();}voidprocess_update(){inti=1,index,flag;chartemp[20];printf

9、("Pleaseinputthedataindexthatyouwanttoupdate:");fflush(stdin);scanf("%d",&index);p_main=p_first;if(index>datacount

10、

11、index<1)printf("----------------NoData-----------------");else{while(p_main!=NULL){if(i==index){printf("----------------------------");printf("Number%d'sname:

当前文档最多预览五页,下载文档查看全文

此文档下载收益归作者所有

当前文档最多预览五页,下载文档查看全文
温馨提示:
1. 部分包含数学公式或PPT动画的文件,查看预览时可能会显示错乱或异常,文件下载后无此问题,请放心下载。
2. 本文档由用户上传,版权归属用户,天天文库负责整理代发布。如果您对本文档版权有争议请及时联系客服。
3. 下载前请仔细阅读文档内容,确认文档内容符合您的需求后进行下载,若出现内容与标题不符可向本站投诉处理。
4. 下载文档时可能由于网络波动等原因无法下载或下载错误,付费完成后未能成功下载的用户请联系客服处理。