好文档 - 专业文书写作范文服务资料分享网站

c语言课程设计报告·图书管理系统

天下 分享 时间: 加入收藏 我要投稿 点赞

if(fp==NULL){printf(\数据库打开错误!请检查...\\n\ while(!feof(fp)) {

fscanf(fp,\press,&n[i].year,&n[i].claim_number,&n[i].unit_price,&n[i].collection,&n[i].can_borrow,&n[i].student_name,&n[i].sex,&n[i].student_id,&n[i].number); if(strcmp(title,n[i].title)==0) {

strcpy(d,n[i].press);strcpy(n[i].press,n[i].title);strcpy(n[i].title,d); e=n[i].number/10000;n[i].collection=e; f=n[i].number000;n[i].can_borrow=f; } i+=1; } j=i;

fclose(fp);

fp=fopen(\图书信息数据库.txt\

if(fp==NULL){printf(\数据库打开错误!请检查...\\n\ i=0;

while(j!=0) {

fprintf(fp,\ess,n[i].year,n[i].claim_number,n[i].unit_price,n[i].collection,n[i].can_borrow,n[i].student_name,n[i].sex,n[i].student_id,n[i].number); fflush(fp); i+=1; j-=1; } fclose(fp); system(\

printf(\删除成功!\\n\\n\ printf(\

-------------------------------------------------------\\n\

printf(\继续删除 [2].返回管理员功能菜单 [0].退出系统 \\n\

printf(\

-------------------------------------------------------\\n\ printf(\请选择:\ scanf(\ while(1) {

switch(b) {

case 1:goto A;break; case 2:return(back=1); case 0: {

system(\ printf(\

------------------------------------------------------------\\n\

printf(\感谢使用,再见! =- \\n\

printf(\

------------------------------------------------------------\\n\ exit(0); } } } }

case 2:return(back=1); } } }

if(a!=1) {

fclose(fp);

printf(\未找到与书名相符的图书!\\n\\n\

printf(\ printf(\重新搜索 [2].返回管理员功能菜单 [0].退出系统 \\n\ printf(\ printf(\请选择:\ scanf(\ while(1) {

switch(b) {

case 1:goto A;break; case 2:return(back=1); case 0: {

system(\ printf(\

------------------------------------------------------------\\n\

printf(\感谢使用,再见! =- \\n\

printf(\

------------------------------------------------------------\\n\ exit(0);

} } } } }

int borrow(int back)xt\

if(fp==NULL){printf(\数据库打开错误!请检查...\\n\ p=(struct Book*)malloc(LONG); while(!feof(fp)) {

fscanf(fp,\year,p->claim_number,p->unit_price,&p->collection,&p->can_borrow,p->student_name,p->sex,p->student_id,&p->number);

if(strcmp(title,p->title)==0) {

a=1;

if(p->can_borrow!=0)b=1;

printf(\====\\n\

printf(\书名 作者 出版社 年份 索取号 馆藏 可借\\n\

printf(\----\\n\

printf(\im_number,p->collection,p->can_borrow); break; } } if(a!=1) {

fclose(fp);

printf(\无该书信息!\\n\\n\

printf(\ printf(\继续搜索 [2].返回学生功能菜单 [0].退出系统 \\n\ printf(\ printf(\请选择:\ scanf(\ while(1) {

switch(c) {

case 1:goto A;

case 2:return(back=1);

case 0: {

system(\ printf(\

------------------------------------------------------------\\n\

printf(\感谢使用,再见! =- \\n\

printf(\

------------------------------------------------------------\\n\ exit(0); } } } }

if(b!=1) {

fclose(fp);

printf(\无法办理该书借阅手续!\\n\\n\

printf(\ printf(\继续搜索 [2].返回学生功能菜单 [0].退出系统 \\n\ printf(\ printf(\请选择:\ scanf(\ while(1) {

switch(c) {

case 1:goto A;

case 2:return(back=1); case 0: {

system(\ printf(\

------------------------------------------------------------\\n\

printf(\感谢使用,再见! =- \\n\

printf(\

------------------------------------------------------------\\n\ exit(0); } } } }

if(b==1) {

printf(\是否办理该书借书手续\\n\

printf(\ printf(\是 [2].否 \\n\ printf(\ scanf(\ while(1) {

switch(c) {

case 1: {

system(\

printf(\请输入你的个人信息:\\n\ printf(\

=======================================================\\n\

printf(\姓名 性别 学号 \\n\

printf(\

-------------------------------------------------------\\n\

scanf(\ fp=fopen(\图书信息数据库.txt\

if(fp==NULL){printf(\数据库打开错误!请检查...\\n\ while(!feof(fp)) {

fscanf(fp,\press,&n[i].year,&n[i].claim_number,&n[i].unit_price,&n[i].collection,&n[i].can_borrow,&n[i].student_name,&n[i].sex,&n[i].student_id,&n[i].number); if(strcmp(title,n[i].title)==0) {

if(d!=1&&strcmp(n[i].student_name,\未知\ {

strcpy(n[i].student_name,student_name); strcpy(n[i].sex,sex);

strcpy(n[i].student_id,student_id); d=1; }

n[i].can_borrow-=1; } i+=1; }

fclose(fp); j=i;

fp=fopen(\图书信息数据库.txt\

if(fp==NULL){printf(\数据库打开错误!请检查...\\n\

c语言课程设计报告·图书管理系统

if(fp==NULL){printf(\数据库打开错误!请检查...\\n\while(!feof(fp)){fscanf(fp,\press,&n[i].year,&n[i].claim_number,&n[i].unit_price,&n[i].collection,&n[i].can_borrow,&n[i].student
推荐度:
点击下载文档文档为doc格式
062lf3f38147ty70kclt55mbv23ri50056b
领取福利

微信扫码领取福利

微信扫码分享