当前位置: 首页 > news >正文

兰州网站建设索q479185700做电影网站为什么查封不了

兰州网站建设索q479185700,做电影网站为什么查封不了,wordpress seo标题,cad外包网站系统设计-设计思路 定义结构体来保存通讯录中联系人的各项信息 使用主菜单实现对通讯录主要功能的管理#xff0c;不同功能对应着不同的编号 使用结构体数据来存储多个联系人 采用文件来保存联系人的数据#xff0c;提高操作效率 系统的数据输入包括输入功能编号以及联系…系统设计-设计思路 定义结构体来保存通讯录中联系人的各项信息 使用主菜单实现对通讯录主要功能的管理不同功能对应着不同的编号 使用结构体数据来存储多个联系人 采用文件来保存联系人的数据提高操作效率 系统的数据输入包括输入功能编号以及联系人的各项信息。数据输出主要指显示联系人的信息 系统设计-模块划分 主模块该模块主要用来完成整个系统的流程在主模块中调用其他函数实现整个系统的功能。 新增联系人信息模块该模块分别根据提示信息输入联系人的姓名、职业、电话、电子邮件、地址输入结束后自动将联系人信息保存在磁盘文件中。 该模块根据提示信息输入联系人信息并保存到磁盘文件中。  文件处理函数fopen、feof、fread、fwrite、fclose。 字符串处理函数strcmp。 查询联系人信息模块该模块用于在通讯录中根据姓名查找指定的联系人并根据系统提示决定是否显示该信息 根据姓名查找指定的联系人并根据系统提示决定是否显示该信息。 修改联系人信息模块该模块用来修改通讯录中指定联系人的信息。根据姓名 删除联系人信息模块该模块将指定联系人的信息从通讯录中删除。根据姓名 排序模块该模块将通讯录中的所有联系人按照姓名的字母顺序进行排序。 显示联系人信息模块该模块用来显示通讯录中所有的联系人信息。 系统设计-数据结构设计 #includestdio.h #includestdlib.h #includeconio.h #includedos.h #includestring.h/*系统化输出*/ #define LEN sizeof(struct addritem) #define FORMAT %-10s%-10s%-15s%-25s%-30s%\n #define DATA addrinfo[i].name,addrinfo[i].occu,addrinfo[i].tel,addrinfo[i].email,addrinfo[i].address/*定义通讯录条目结构体*/ struct addritem {char name[30]; /*联系人姓名*/char occu[30]; /*联系人职业*/char tel[15]; /*联系人电话*/char email[30]; /*联系人邮箱*/char address[30]; /*联系人地址*/ };/*结构体数组*/ struct addritem addrinfo[100];/*声明函数*/ void input(); void search(); void update(); void del(); void display(); void sort(); //按照联系人姓名排序 void menu();void menu() {system(cls);printf(\n\n\n\n\n\n);printf(\t\t-----------------------CONTACT-----------------------|\n);printf(\t\t| 0.exit |\n);printf(\t\t| 1.input record |\n);printf(\t\t| 2.search record |\n);printf(\t\t| 3.update record |\n);printf(\t\t| 4.delete record |\n);printf(\t\t| 5.sort record |\n);printf(\t\t| 6.display |\n);printf(\t\t-----------------------------------------------------|\n\n);printf(\t\t\tchoose(0-6):); } //增加联系人 void input() {int i, count 0;char ch[2]; //记录用户输入FILE *fp; //文件指针变量if ((fp fopen(data.txt, a)) NULL) { //a 以附加的方式打开文件printf(can not open\n);return;}while (!feof(fp)) { //feof 检测流上的结束符 eof 返回零值或非零值if (fread(addrinfo[count], LEN, 1, fp) 1)//第一个参数 指定用于接收数据的内存地址 //第二个参数 指定每个数据项的字节数 //第三个参数 指定每次读取数据项的个数//第四个参数 代表输入流count;}fclose(fp);if (count 0) {printf(No contact record!\n);}else {system(cls);display();}if ((fp fopen(data.txt, wb)) NULL) { //wb 只写的方式printf(can not open address list\n);return;}for (i 0; i count; i) {fwrite(addrinfo[i], LEN, 1, fp);}printf(please input(y/n));scanf(%c, ch);while (strcmp(ch, Y) 0 || strcmp(ch, y) 0) {printf(name:);scanf(%s, addrinfo[count].name);for (i 0; i count; i) {if (strcmp(addrinfo[i].name, addrinfo[count].name) 0) {printf(The name already exists,press any key to continue);getch();fclose(fp);return;}}printf(occupation:);scanf(%s, addrinfo[count].occu);printf(telephone:);scanf(%s, addrinfo[count].tel);printf(email:);scanf(%s, addrinfo[count].email);printf(address:);scanf(%s, addrinfo[count].address);if (fwrite(addrinfo[count], LEN, 1, fp) ! 1) {printf(can not save the record);}else {printf(%s saved!\n, addrinfo[count].name);count;}fclose(fp);printf(continue?(y/n));scanf(%s, ch);}fclose(fp);printf(OK!\n); }//查询联系人 void search() {FILE *fp;int i, count 0;char ch[2], name[15];if ((fp fopen(data.txt, rb)) NULL) {printf(can not open\n);return;}//读取联系人信息while (!feof(fp))if (fread(addrinfo[count], LEN, 1, fp) 1)count;fclose(fp);if (count 0) {print(no record!\n);return;}printf(please input the name:);scanf(%s, name);for (i 0; i count; i) {if (strcmp(name, addrinfo[i].name) 0) {print(find the contact,display?(y/n));scanf(%s, ch);if (strcmp(ch, Y) 0 || strcmp(ch, y) 0) {printf(name occupation telephone email address\t\n);printf(FORMAT, DATA);}break;}if (i count) {printf(can not find the contact!\n);}} }//修改通讯录 void update() {FILE *fp;int i, j, count 0;char name[15];if (fp fopen(data.txt, r) NULL) {printf(can not open\n);return;}while (!feof(fp)) {if (fread(addrinfo[count], LEN, 1, fp) 1) {count;}}if (count 0) {printf(no record!\n);fclose(fp);return;}display();printf(please input the name of the contact which you want to update\n);printf(update name:);scanf(%s, name);for (i 0; i count; i) {if (strcmp(name, addrinfo[i].name) 0) {printf(find the contact! you can update!\n);printf(name:);scanf(%s, addrinfo[i].name);printf(occupation:);scanf(%s, addrinfo[i].occu);printf(telephone:);scanf(%s, addrinfo[i].tel);printf(email:);scanf(%s, addrinfo[i].email);printf(address:);scanf(%s, addrinfo[i].address);}if (fp fopen(data.txt, wb) NULL) {printf(can not ioen\n);return;}for (j 0; j count; j) {if (fwrite(addrinfo[j], LEN, 1, fp) ! 1) {printf(can not save!);getch();}fclose(fp);return;} }printf(can not find the contact!\n); }//删除联系人 void del() {FILE *fp;int i, j, count 0;char ch[15],name[15];if (fp fopen(data.txt, r) NULL) {printf(can not open\n);return;}while (!feof(fp)) {if (fread(addrinfo[count], LEN, 1, fp) 1) {count;}}fclose(fp);if (count 0) {printf(no record!\n);return;}display();printf(please input the name of the contact which you want to delete\n);printf(delete name:);scanf(%s, name);for (i 0; i count; i) {if (strcmp(name, addrinfo[i].name) 0) {printf(find the contact! del(y/n)!\n);scanf(%s, ch);if (strcmp(ch, Y) 0 || strcmp(ch, y) 0) {for (j i; j count; j) { //将i之后的纪录前移addrinfo[j] addrinfo[j 1];}}count--;if (fp fopen(data.txt, wb) NULL) {printf(can not open\n);return;}for (j 0; j count; j) {if (fwrite(addrinfo[j], LEN, 1, fp) ! 1) {printf(can not save!);getch();}}fclose(fp);printf(del sucessfully!\n);return;}printf(not find the contact!\n);} }void sort() {FILE *fp;struct addritem t;int i 0, j 0, count 0;if ((fp fopen(data.txt, r)) NULL) {printf(can not open!\n);return;}while (!feof(fp)) if (fread(addrinfo[count], LEN, 1, fp) 1) count;fclose(fp);if (count 0) {printf(no record!\n);return;}for (i 0; i count - 1; i) for(j0;jcount;j)if (strcmp(addrinfo[i].name, addrinfo[i].name) 0){t addrinfo[i];addrinfo[i] addrinfo[j];addrinfo[j] t;}if (fp fopen(data.txt, wb) NULL) {printf(can not open\n);return;}for (j 0; j count; j) if (fwrite(addrinfo[j], LEN, 1, fp) ! 1) {printf(can not save!);getch();}fclose(fp);printf(save successfully); }void display() {FILE *fp;int i 0, count 0;fp fopen(data.txt, r);while (!feof(fp))if (fread(addrinfo[count], LEN, 1, fp) 1)count;fclose(fp);printf(name occupation telephone email address\t\n);if (count 0) {printf(no record to display!\n);return;}for(i0;icount;i)printf(FORMAT, DATA); }void main() {int n;menu();scanf(%d,n);while (n){switch (n){case 1:input(); break;case 2:search(); break;case 3:update(); break;case 4:del(); break;case 5:sort(); break;case 6:display(); break;default:break;}getch();menu();scanf(%d, n);} }
http://www.pierceye.com/news/696067/

相关文章:

  • 北京服饰网站建设实训百度搜索引擎的总结
  • 营销型网站建设的一般过程包括哪些环节?体育视频网站建设
  • 门户网网站seo怎么做电子商务平台怎么注册
  • 凡科网站插件代码阿里云网站备案后
  • 网站用什么系统好用免费网站建设找哪家
  • 网站到期续费吗网站开发是培训
  • 别人帮做的网站怎么修改怎么做产品推广和宣传
  • 国内返利网站怎么做php建设网站工具
  • 网站设计教程文档创业商机网农村
  • 宁夏交通建设质监局官方网站免费注册二级域名的网站
  • 网站门户设计网站建设有没有做的必要
  • 建模师的就业前景整站优化工具
  • 微信公众号怎么做链接网站网站404 原因
  • 安卓手机做服务器网站网站设计时多页面切换时什么控件
  • 长沙正规网站建设价格网站推广怎么发外链
  • 专业版装修用什么网站做导航条深圳网站制作易捷网络
  • 哪个公司建设网站好手机网站维护费
  • 中山高端网站建设wordpress调用分类文章列表
  • 营销网站的专业性诊断评价和优化做视频网站需要什么资质
  • 河南广告制作公司网站西班牙语网站设计公司哪家好
  • 做业务一般要注册哪些网站wordpress prepare
  • wordpress 鼠标经过seo网站内容优化有哪些
  • 单页网站制作视频教程深圳有哪些软件外包公司
  • 嘉兴电子商务网站建设wordpress如何添加页面子目录
  • 教育在线网站怎样做直播seo网站推广怎样
  • 响应式的网站建设一个多少钱百度域名解析
  • 东莞做网站卓诚网络免费大数据分析网站
  • 网站用什么图片格式好seo学徒招聘
  • 地区网站建设网站用户反馈
  • 网站备案背景幕布下载成都最好的seo外包