ImageVerifierCode 换一换
格式:DOCX , 页数:47 ,大小:61.40KB ,
资源ID:18167219      下载积分:3 金币
快捷下载
登录下载
邮箱/手机:
温馨提示:
快捷下载时,用户名和密码都是您填写的邮箱或者手机号,方便查询和重复下载(系统自动生成)。 如填写123,账号就是123,密码也是123。
特别说明:
请自助下载,系统不会自动发送文件的哦; 如果您已付费,想二次下载,请登录后访问:我的下载记录
支付方式: 支付宝    微信支付   
验证码:   换一换

加入VIP,免费下载
 

温馨提示:由于个人手机设置不同,如果发现不能下载,请复制以下地址【https://www.bdocx.com/down/18167219.html】到电脑端继续下载(重复下载不扣费)。

已注册用户请登录:
账号:
密码:
验证码:   换一换
  忘记密码?
三方登录: 微信登录   QQ登录  

下载须知

1: 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。
2: 试题试卷类文档,如果标题没有明确说明有答案则都视为没有答案,请知晓。
3: 文件的所有权益归上传用户所有。
4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
5. 本站仅提供交流平台,并不能对任何下载内容负责。
6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

版权提示 | 免责声明

本文(c语言图书管理系统上机实验Word文档格式.docx)为本站会员(b****4)主动上传,冰豆网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。 若此文所含内容侵犯了您的版权或隐私,请立即通知冰豆网(发送邮件至service@bdocx.com或直接QQ联系客服),我们立即给予删除!

c语言图书管理系统上机实验Word文档格式.docx

1、(1)各种基本数据的录入。如:图书资料基本信息录入等。(2) 各种基本数据的修改。即:允许对以及录入的数据重新进行编辑、修改。(3)各种基本数据的插入。在图书采购信息中插入一条新信息等。(4)各种基本数据的删除。假设某本书遗失且馆藏数为0,删除该书的相关信息等。(5)基于各种数据的查询。书名中含有“计算机”的所有书籍、全部借出的所有图书等。(6) 基于各种基本数据的统计计算。四【上机调试程序流程图】(注:可打印)五【上机调试中出现的错误信息、错误原因及解决办法】读写错误:fopen的时候改成用二进制读写.目前不知道为什么不用二进制不能读写.六【上机调试后的源程序及还存在的问题】#include

2、 dos.hconio.hstdlib.hstdio.hstring.h#define Key_UP 72#define Key_DOWN 80#define Key_ENTER 28#define Key_N 49#define Key_Y 21#define LEN sizeof(struct linklist)typedef struct book1 /*图书基本信息结构体*/ char name20。 char writer30。 char type20。 char num20。 char time20。 char press20。 char edition20。 char ISBN4

3、0。 float price。 int count。 int lendnum。bbasic。/*图书资料基本信息:中图法分类号、图书编号、书名、作者(要考虑多个作者情况)、出版社、出版日期、ISBN、版次、定价、馆藏数、借阅数等。*/typedef struct book2 /*图书采购信息结构体*/ char writer20。 char time15。 int num。 float money。 char bill 30。bpurchase。图书采购信息:书名、作者、采购日期、采购数量、采购单价、采购金额、发票号码、图书编号等。typedef struct book3 /*图书借阅信息结构

4、体*/*需要输入的信息*/ char person20。 char company20。 /*借书证号*/ char btime15。/*运算可得信息*/ char rtime15。 char fine20。blend。图书借阅信息:借阅人、借阅人所在单位、借书证号、所借书名、借阅日期、归还日期、逾期罚款等。借阅期限为一个月,逾期1天,罚款1角。struct linklist bbasic binfo。 struct linklist *next。int key()。void menu()。void _window()。void words()。void box(int,int,int,int

5、)。int _choose(int bot, int top)。void play(int)。int readsum()。void add()。void addbook()。void addbuy()。void addborrow()。void manage()。struct linklist* create()。void modify()。void delete()。void insert()。void search()。void searchname()。void searchwriter()。void orderw(bbasic binfo100)。int halfn(int sum,b

6、basic binfo100,char *find)。int halfw(int sum,bbasic binfo100,char *find)。void sta()。void blist()。void bmoney()。int main(void) menu()。void menu() int y。 _window()。 /*显示窗口*/ words()。 /*显示菜单文字*/ y = choose(7,19)。 /*光标*/ play(y)。 /*根据键盘值操作*/void _window() /*窗口初始化*/ textbackground(BLUE)。 textcolor(WHITE)

7、。 clrscr()。 box(1,1,24,80)。void words() /*显示菜单文字*/ gotoxy(30,7)。 textbackground(RED)。 cprintf(Add Book info)。 gotoxy(30,10)。Manage Book gotoxy(30,13)。Search Book gotoxy(30,16)。Book Statistic gotoxy(30,19)。Exit gotoxy(35,22)。 textcolor(LIGHTGRAY)。 Main Menu gotoxy(25, 2)。 textcolor(RED)。 highvideo()。

8、The Library Managemnt Program normvideo()。void box(int x,int y, int high, int width) /*画方框*/ int i。 gotoxy(x,y)。 putchar(0xda)。 for (i = 1 。 i bot) upbar(y)。 y = y - 3。 。break。 case Key_DOWN: if (y top) downbar(y)。 y = y + 3。 while(ky != Key_ENTER)。 return y。upbar(int y) /*光标上移*/ typedef struct texe

9、l_struct unsigned char ch。 unsigned char attr。 texel。 texel t。 for(i=30。i=48。i+) gettext(i,y,i,y,&t)。 t.attr=0x1f。 puttext(i,y,i,y,& gettext(i,y-3,i,y-3,& t.attr=0x4f。 puttext(i,y-3,i,y-3,& 。 gotoxy(30,y-3)。 return。downbar(int y) /*光标下移*/ gettext(i,y+3,i,y+3,& puttext(i,y+3,i,y+3,& gotoxy(30,y+3)。vo

10、id play(int y) /*根据y的值选择操作*/ switch(y) case 7:add()。 break。 case 10:manage()。 case 13:search()。 case 16:sta()。 case 19:exit(1)。 default:printf(Errorexit(0)。void add() /*显示 选择增加那种类型的信息 的窗口*/Add Basic infoAdd Purchase infoAdd Borrow infoBack Add Book y=choose(7,16)。 switch(y) /*选择增加信息类型的函数*/ case 7 :a

11、ddbook()。 /*增加图书基本信息*/addbuy()。 /*增加图书购买信息*/addborrow()。 /*增加图书借阅信息*/menu()。void addbook() /*增加图书基本信息*/ int ky, sum = 0。 FILE *fp。 if(fp = fopen(e:sum.dat,rb) != NULL) /*读取图书基本信息数量sum*/ fread(&sum,2,1,fp)。 fclose(fp)。 if (fp = fopen(addbook.datab) = NULL) printf(cannot write the addbook.dat clrscr()

12、。 gotoxy(2,2)。 cprintf(Please input the classfication of chinese library classification: scanf(%s,&binfo.type)。 getchar()。 gotoxy(2,4)。Please input the books number:binfo.num)。 gotoxy(2,6)。s name:binfo.name)。 gotoxy(2,8)。s writer:binfo.writer)。 gotoxy(2,10)。Please input the the books press:binfo.pre

13、ss)。 gotoxy(2,12)。s edition:binfo.edition)。 gotoxy(2,14)。s publish time:binfo.time)。 gotoxy(2,16)。Please input the price:%fbinfo.price)。 gotoxy(2,18)。Please input the ISBN of the book:binfo.ISBN)。 gotoxy(2,20)。Please input the count of books:%dbinfo.count)。 gotoxy(2,22)。Please input the lend number

14、of the book:binfo.lendnum)。 gotoxy(10,25)。Press N(n) to finish add book or Press any key to add more book. sum+。 if(fwrite(&binfo,sizeof(bbasic),1,fp) != 1) clrscr()。 printf(cannot save the data. while(ky != Key_N)。wbcannot save the sum of the book. getch()。 exit(0)。 if(fwrite(&sum,2,1,fp) !fail to

15、write the sum.dat./* 中图法分类号、(要考虑多个作者情况)、出版社、出版日期、ISBN、版次、定价、馆藏数、借阅数等。 */void addbuy() /*增加图书购买信息*/ int ky。 bpurchase pinfo。addbuy.datcannot open the addbuy data.pinfo.name)。pinfo.writer)。s buy time:Please input the number of the book buy:pinfo.num)。pinfo.price)。Please input the real money of buy the book:, &pinfo.money)。Please input the bill number:pinfo.bill)。 gotoxy(10,20)。pinfo,sizeof(pinfo),1,fp) !void addborrow() /*增加图书借阅信息*/ blend linfo。addborrow.datcannot open the addborrow data.

copyright@ 2008-2022 冰豆网网站版权所有

经营许可证编号:鄂ICP备2022015515号-1