c课程设计报告歌星管理系统报告(编辑修改稿)内容摘要:
:,N)。 scanf(%d,amp。 n)。 printf(\n\t\t enter message now\n\n)。 for(i=1。 i=n。 i++) {printf(\n\t\t input %dth user message.\n,i)。 input(i1)。 } if(i!=0) save(n)。 printf_back()。 } 追加模块 void add() { int i,n,m,k。 FILE *fp。 n=load()。 printf(\t\t how many users are you want to add(1%d)?:,Nn)。 K=m+n I 从 n 到 k 调用输入函数 input( i) 保存追加的记录 调用加载函数 n=load();并计算可以记录个数 n 输入用户要追加订户信息的个数 m 保存调用 函数 save(n) scanf(%d,amp。 m)。 k=m+n。 for(i=n+1。 i=k。 i++) {printf(\n\t\t input %dth user message.\n,in)。 input(i1)。 } if((fp=fopen(,ab))==NULL) {printf(cannot open file\n)。 } for(i=n。 ik。 i++) { if(fwrite(amp。 U[i],sizeof(struct user),1,fp)!=1) printf(file write error\n)。 } fclose(fp)。 printf_back()。 } 浏览模块 void browse() { int i,n。 n=load()。 printf_face()。 for(i=0。 in。 i++) {if((i!=0)amp。 amp。 (i%10==0)) {printf(\n\n\t\t pass any key to continue ...)。 getchar()。 puts(\n\n)。 } printf_one(i)。 } printf(\n\t\t there are %d message.\n,n)。 printf(\n\t\t pass any key to back ...\n)。 getchar()。 menu()。 } 删除模块 void del() { int n,k,i,w1=1,w2。 struct user W。 显示订户记录 按任意键显示下一屏 按任意键返回主菜单 n=load()。 do { do { k=1。 printf(\n\n\t\t enter date that you want to search! date:)。 scanf(%s,)。 printf_face()。 for(i=0。 in。 i++) if(strcmp(,U[i].date)0) { k=i。 U[k].amount=0。 printf_one(k)。 } if(k==1) { printf(\n\n\t\t NO exist!please)。 printf(\n\n\t\t are you again?\n\t 1).again 2).no and back [ ]\b\b)。 scanf(%d,amp。 w1)。 if(w1!=1) break。 } } while(k==1amp。 amp。 w1==1)。 if(k!=1) { printf(\n\n\t\t what do you want to do?\n\t 1).seach another 2).delete 3).back menu []\b\b)。 scanf(%d,amp。 w2)。 switch (w2) { case(2):{printf(\n\n\t\t do you want to delete?\n\t 1).yes 2).no and back [ ]\b\b)。 scanf(%d,amp。 w1)。 } } if(w1==1) U[k].amount=0。 save(n)。 printf(\n\n\t\t successful.^_^.)。 printf(。c课程设计报告歌星管理系统报告(编辑修改稿)
阅读剩余 0%
本站所有文章资讯、展示的图片素材等内容均为注册用户上传(部分报媒/平媒内容转载自网络合作媒体),仅供学习参考。
用户通过本站上传、发布的任何内容的知识产权归属用户或原始著作权人所有。如有侵犯您的版权,请联系我们反馈本站将在三个工作日内改正。