c语言图书管理系统上机实验报告!内容摘要:
binfo),sizeof(bbasic),1,fp) != 1) { printf(cannot save the data.)。 } } p2 next = NULL。 fclose(fp)。 return head。 } void modify() { struct linklist* p,*head。 char find[30]。 int i,ky,sum。 FILE *fp。 p= head = create()。 sum = readsum()。 clrscr()。 printf(Plese input the name of the book you want to modify:)。 scanf(%s,find)。 for (i = 0。 isum。 i++) { if(strcmp(find,p ) == 0) { gotoxy(2,2)。 cprintf(Please input the classfication of chinese library classification:)。 scanf(%s,amp。 (p ))。 getchar()。 gotoxy(2,4)。 cprintf(Please input the book39。 s number:)。 scanf(%s,amp。 (p ))。 getchar()。 gotoxy(2,6)。 cprintf(Please input the book39。 s name:)。 scanf(%s,amp。 (p ))。 getchar()。 gotoxy(2,8)。 cprintf(Please input the book39。 s writer:)。 scanf(%s,amp。 (p ))。 getchar()。 gotoxy(2,10)。 cprintf(Please input the the book39。 s press:)。 scanf(%s,amp。 (p ))。 getchar()。 gotoxy(2,12)。 cprintf(Please input the book39。 s edition:)。 scanf(%s,amp。 (p ))。 getchar()。 gotoxy(2,14)。 cprintf(Please input the book39。 s publish time:)。 scanf(%s,amp。 (p ))。 getchar()。 gotoxy(2,16)。 cprintf(Please input the price:)。 scanf(%f,amp。 (p ))。 getchar()。 gotoxy(2,18)。 cprintf(Please input the ISBN of the book:)。 scanf(%s,amp。 (p ))。 getchar()。 gotoxy(2,20)。 cprintf(Please input the count of books:)。 scanf(%d,amp。 (p ))。 getchar()。 gotoxy(2,22)。 cprintf(Please input the lend number of the book:)。 scanf(%d,amp。 (p ))。 getchar()。 printf(Press Y to continue or Press anykey to back to menu.)。 ky = key()。 if(ky == Key_Y) { p = head。 i = 1。 clrscr()。 printf(Plese input the name of the book you want to modify:)。 scanf(%s,find)。 } else { p = head。 if ((fp = fopen(e:\\,wb)) == NULL) { printf(cannot open )。 } for (i = 0。 i sum。 i++) { if(fwrite(amp。 (p binfo),sizeof(bbasic),1,fp) != 1) { clrscr()。 printf(cannot save the data.)。 } p = p next。 } fclose(fp)。 menu()。 } } p = p next。 } clrscr()。 printf(cannot find the book.)。 getch()。 } void delete() { struct linklist* p1,*p2,*head。 char find[30]。 int i,ky,sum,flag = 0。 FILE *fp。 p1 = p2 = head = create()。 sum = readsum()。 clrscr()。 printf(Plese input the name of the book you want to Delete:)。 scanf(%s,find)。 if(strcmp(find,head ) == 0) { head = head next。 sum。 flag = 1。 } else { for (i = 0。 i sum。 i++) { p1 = p1 next。 if(strcmp(find,p1 ) == 0) { p1 = p1 next。 p2 next = p1。 sum。 flag = 1。 break。 } else { p2 = p2 next。 } } } if (flag != 1) { printf(cannot find the book.)。 getch()。 menu()。 } p1 = head。 if ((fp = fopen(e:\\,wb)) == NULL) { printf(cannot open )。 } for (i = 0。 i sum。 i++) { if(fwrite(amp。 (p1 binfo),sizeof(bbasic),1,fp) != 1) { clrscr()。 printf(cannot save the data.)。 } p1 = p1 next。 } fclose(fp)。 if((fp = fopen(e:\\,wb)) == NULL) { printf(cannot open )。 } if(fwrite(amp。 sum,2,1,fp) != 1) { printf(fail to write the .)。 getch()。 exit(0)。 } fclose(fp)。 printf(succeed to delete the anykey to get back to the mainmenu.)。 getch()。 } void insert() { struct linklist* p1,*p2, *head, *temp。 char find[10]。 int i,ky,sum,flag = 0。 FILE *fp。 clrscr()。 sum = readsum()。 p1 = p2 = head = create()。 temp = (struct linklist*)malloc(LEN)。 printf(The number you want to insert behind:)。 scanf(%s,find)。 for(i = 0。 i sum。 i++) { p1 = p1next。 if(strcmp(find,p2 ) == 0) { p2 next = temp。 temp next =p1。 sum ++。 flag = 1。 break。 } else { p2 = p2next。 } } if (flag != 1) { printf(cannot find the book.)。 getch()。 menu()。 } clrscr()。 gotoxy(2,2)。 cprintf(Please input the classfication of chinese library classification:)。 scanf(%s,amp。 (temp ))。 getchar()。 gotoxy(2,4)。 cprintf(Please input the book39。 s number:)。 scanf(%s,amp。 (temp ))。 getchar()。 gotoxy(2,6)。 cprintf(Please input the book39。 s name:)。 scanf(%s,amp。 (temp ))。 getchar()。 gotoxy(2,8)。 cprintf(Please input the book39。 s writer:)。 scanf(%s,amp。 (temp ))。 getchar()。 gotoxy(2,10)。 cprintf(Please input the the book39。 s press:)。 scanf(%s,amp。 (temp ))。 getchar()。 gotoxy(2,12)。 cprintf(Please input the book39。 s edition:)。 scanf(%s,amp。 (temp ))。 getchar()。 gotoxy(2,14)。 cprintf(Please input the book39。 s publish time:)。 scanf(%s,amp。 (temp ))。 getchar()。 gotoxy(2,16)。 cprintf(Please input the price:)。 scanf(%f,amp。 (temp ))。 getchar()。 gotoxy(2,18)。 cprintf(Please input the ISBN of the book:)。 scanf(%s,amp。 (temp ))。 getchar()。 gotoxy(2,20)。 cprintf(Please input the count of books:)。 scanf(%d,amp。 (temp ))。 getchar()。 gotoxy(2,22)。 cprintf(Please input the lend number of the book:)。 scanf(%d,amp。 (temp ))。 getchar()。 gotoxy(10,25)。 cprintf(Press Y to continue or Press anykey to back to menu.)。 ky = key()。 if(ky == Key_Y) { insert()。 } else { p1 = head。 if ((fp = fopen(e:\\,wb)) == NULL) { printf(cannot open )。 } for (i = 0。 i sum。 i++) { if(fwrite(amp。 (p1 binfo),sizeof(bbasic),1,fp) != 1) { c。c语言图书管理系统上机实验报告!
相关推荐
(pause)。 return。 } printf(\n 你需要借阅的图书是: \n)。 printf(书名 编号 作者 价格 出版社 类别 原始库存 借出 \n)。 printf(%10s%10s%10s%%10s%10s%10d%4d\n,,ress,)。 if(==){ printf(\n 该册图书已全部借出。 正在退出 \n)。 system(pause)。 return。 }
void menu1()。 void num1() { int b。 INF A[20]。 char ch1。 char ch2。 char ch3。 FILE *fp。 int j。 int i=0。 L: printf(******* *******\n)。 printf(\n)。 printf(******* *******\n)。 scanf(%d,amp。 b)。 if(b==1) M
24 6 课程心得总结 通过这次亲自动手编写 C语言图书管理系统,从中收获了很多。 很多学过的知识得以巩固,对链表、数组指针、结构体等知识有了更深一步的了解。 编写的过程中我也借鉴别人设计的一些程序,从中发现了自己的一些不足,在构建框架 和编写源程序上面的一些问题。 在源程序编写好后,对源程序的检测花费了我很多时间,这也算是锻炼了我的耐心。
printf(价格 :)。 scanf(%f,equ[i].price)。 break。 case 5: printf(购入时间 :)。 scanf(%s,equ[i].indate)。 break。 case 6: printf(是否报废 :)。 scanf(%s,equ[i].out)。 break。 case 7: printf(报废时间 :)。 scanf(%s,equ[i]
的损坏,我们不承担任何责任。 EAC 学生信息管理系统 6 三、数据库的设计 表的设计 在这里创建了 admin(用户表) 表,该表是用来管理本软件的管理员的。 在这里有资 料的用户 可以对系统里的数据进行任何操作,所以应尽量避免管理员的使用。 图 admin表 Class(班级 )表的创建 : 图 class表 College(分院)表的创建: 管理员 用 户 编 号 昵称 密码 权限 用户名
可行性分析: 1 技术可行性 根据客户提出的系统功能、性能及实现系统的各项约束条件,根据新系统目标来衡量所需的技术是否具备,本系统是一个数据库管理和查询的系统,现有的技术以较为成熟,硬件、软件的性能要求、环境条件等各项条件良好,估计利用现有技术条件应完全可以达到该系统的功能目标。 同时,考虑给予的开发期限也较为充裕,预计系统是可以在规定期限内完成开发。 2 经济可行性 估算新系统的成本效益分析