网站大量收购独家精品文档,联系QQ:2885784924

宿舍管理系统程序(Dormitory management system program).doc

宿舍管理系统程序(Dormitory management system program).doc

  1. 1、本文档共20页,可阅读全部内容。
  2. 2、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
  3. 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载
  4. 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
宿舍管理系统程序(Dormitory management system program)

宿舍管理系统程序(Dormitory management system program) / * 宿舍管理 * / # includes stdio.h 引用库函数 / * * / # includes stdlib.h # includes ctype.h # includes string.h typedef 定义结构体数组 struct / * * / { char roomnum [4]; / * 房间号 * / char bednum [2]; / * 床位号 * / char num [10]; / * 学号 * / char name [20]; / * 姓名 * / } the student; student room1 (1000); / * 结构体数组变量 * / int menu select 菜单函数 _ () / * * / { char c; do { system (cls); / * 运行前清屏 * / printf (\ t \ t★★★★★★学生宿舍管理系统★★★★★★ \ n); / * 菜单选择 * / printf (\ t \ t§ 1. 输入记录 (\ n ); printf (\ t \ t§ 2. 显示记录 (\ n ); printf (\ t \ t§ 3. 按房间号排序并显示 (\ n ); printf (\ t \ t§ 4. 按学号排序并显示 (\ n ); printf (\ t \ t§ 5. 插入一条记录按学号排序并显示 (\ n ); printf (\ t \ t§ 6. 按姓名查找, 删除一条记录 (\ n ); printf (\ t \ t§ 7 查找并显示一个记录 (\ n); printf (\ t \ t§ 8. 从文件中读入数据 (\ n ); printf (\ t \ t§ 9. 循环写入数据 (\ n ); printf (\ t \ t§ 0. 结束程序 (\ n ); printf (\ t \ t★★★★★★★★★★★★★★★★★★★★ \ n); printf (\ t \ t请选择您要运行的选项按 (0 - 9):); c = getchar (); / * 读入选择 * / } while (c 0 | | c 9). return (0); / * 返回选择 * / } int input (student room [], int n) 输入若干条记录 / * * / {int i = 0; char sign x [10]; / * x [10] 为清除多余的数据所用 * / while (sign. = n sign. = n) / * 判断 * / { printf (\ t \ t房间号:); / * 交互输入 * / scanf (\ t \ t% d , room [n + 1].roomnum); printf (\ t \ t床位号:); scanf (\ t \ t% s, room [n + i].bednum); printf (\ t \ t学号:); scanf (\ t \ t% s, room [n + i].num); printf (\ t \ t姓名:); scanf (\ t \ t% s, room [n + i].name); gets (x); / * 清除多余的输入 * / printf (\ t \ t是否继续输入? (y / n)); scanf (\ t \ t% c, sign); / * 输入判断 * / the + +; } return (n + 1); } void display (student room [], int n) 显示所有记录 / * * / { int i; printf (\ t \ t type: \ n ); / * 格式头 * / printf (\ t \ t房间号 床位号 学号 姓名 \ n ); printf (\ t \ t type: \ n ); for (i = 1; in n + 1; i + +) / * 循环输入 * / { printf (\ t \ t% - 10s% - 10s% - 10s% - 20s \ n , room [- 1].roomnum, room [- 1].bednum, room [- 1].num, room [- 1].name); if ( 1 % 10 = = 0) / * 每十个暂停 * / {printf (\ t \ t type: \ n); / * 格式 * / printf (\ t \ t ); system (pause)

您可能关注的文档

文档评论(0)

jgx3536 + 关注
实名认证
内容提供者

该用户很懒,什么也没介绍

版权声明书
用户编号:6111134150000003

1亿VIP精品文档

相关文档