C语言图书管理系统

上传人:m**** 文档编号:488582291 上传时间:2022-08-20 格式:DOC 页数:35 大小:210.50KB
返回 下载 相关 举报
C语言图书管理系统_第1页
第1页 / 共35页
C语言图书管理系统_第2页
第2页 / 共35页
C语言图书管理系统_第3页
第3页 / 共35页
C语言图书管理系统_第4页
第4页 / 共35页
C语言图书管理系统_第5页
第5页 / 共35页
点击查看更多>>
资源描述

《C语言图书管理系统》由会员分享,可在线阅读,更多相关《C语言图书管理系统(35页珍藏版)》请在金锄头文库上搜索。

1、#include #include #include #include #include #include #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;c

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

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

4、indow();void words();void box(int,int,int,int);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();voi

5、d orderw(bbasic binfo100);void orderw(bbasic binfo100);int halfn(int sum,bbasic 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);/*根据键盘值操作*

6、/void _window()/*窗口初始化*/textbackground(BLUE);textcolor(WHITE);clrscr();box(1,1,24,80);void words()/*显示菜单文字*/textcolor(WHITE);gotoxy(30,7);textbackground(RED);cprintf(Add Book info);textbackground(BLUE);gotoxy(30,10);cprintf(Manage Book);gotoxy(30,13);cprintf(Search Book);gotoxy(30,16);cprintf(Book S

7、tatistic);gotoxy(30,19);cprintf(Exit);gotoxy(35,22);textcolor(LIGHTGRAY);textbackground(BLUE);cprintf( Main Menu );gotoxy(25, 2);textcolor(RED);highvideo();cprintf(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 ;

8、 i width - 1; i+)putchar(0xc4);putchar(0xbf);gotoxy(x, y + high - 3);putchar(0xc0);gotoxy(width, y + high - 3);putchar(0xd9);for (i = 1; i high - 1; i+)gotoxy(x,y+i);putchar(0xb3);gotoxy(x + width -1, y+i);putchar(0xb3);gotoxy(x, y + high - 1);putchar(0xc0);for (i = 1 ; i width - 1; i+)putchar(0xc4)

9、;gotoxy(x + 1, y + high - 3);for (i = 1; i bot)upbar(y);y = y - 3;break;case Key_DOWN:if (y top)downbar(y);y = y + 3;break;while(ky != Key_ENTER);return y;upbar(int y)/*光标上移*/int i;typedef struct texel_structunsigned char ch;unsigned char attr;texel;texel t;for(i=30;i=48;i+)gettext(i,y,i,y,&t);t.att

10、r=0x1f;puttext(i,y,i,y,&t);gettext(i,y-3,i,y-3,&t);t.attr=0x4f;puttext(i,y-3,i,y-3,&t);gotoxy(30,y-3);return;downbar(int y)/*光标下移*/int i;typedef struct texel_structunsigned 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,&t);gettext(i,y+3,i,y

11、+3,&t);t.attr=0x4f;puttext(i,y+3,i,y+3,&t);gotoxy(30,y+3);return;void play(int y) /*根据y的值选择操作*/switch(y)case 7:add();break;case 10:manage();break;case 13:search();break;case 16:sta();break;case 19:exit(1);default:printf(Error);exit(0);void add() /*显示 选择增加那种类型的信息 的窗口*/int y;_window();gotoxy(30,7);textbackground(RED);cprintf(Add Basic info);textbackground(BLUE);gotoxy(30,10);cprintf(Add Purchase info);gotoxy(30,13);cprintf(Add Borrow info);gotoxy(30,16);cprintf(Bac

展开阅读全文
相关资源
正为您匹配相似的精品文档
相关搜索

最新文档


当前位置:首页 > 商业/管理/HR > 商业计划书

电脑版 |金锄头文库版权所有
经营许可证:蜀ICP备13022795号 | 川公网安备 51140202000112号