图书管理系统完整代码,C语言图书管理系统 15002000之间行代码 急求急求

1,C语言图书管理系统 15002000之间行代码 急求急求我还真有一个程序,图书借阅管理的 。。。不是我写的,就300多行代码 。对于1500~2000行表示很有鸭梨 。楼主你自己奋斗吧,除非别人真有这样的程序,不然不会回答你的 。你好!我有,不过只有一千多行我的回答你还满意吗~~
2,C语言编写图书管理系统http://wenwen.sogou.com/z/q711639202.htmhttp://bbs.bccn.net/thread-221233-1-1.html这个网站注册下就能看了http://bbs.zdnet.com.cn/thread-987712-1-1.html如果还有问题,去买本书看看--关于C语言的【图书管理系统完整代码,C语言图书管理系统 15002000之间行代码 急求急求】
3,c图书管理系统帮忙注释下每行代码谢谢//定义图书类public class book#region private membersprivate int id;//唯一标示数据信息private publisher publisher;//出版社private category category;private string title = string.empty;//数据名字private string author = string.empty;//作者private datetime publishdate;//出版时间private string isbn = string.empty;//书籍的isbnprivate int wordscount;//书籍信息量private decimal unitprice;//价格private string contentdescription = string.empty;//内容提要private string aurhordescription = string.empty;//作者描述private string editorcomment = string.empty;//版本private string toc = string.empty;private int clicks;//书籍点击率#endregion#region private memberspublic int idgetset}public publisher publishergetset}public category categorygetset}public string titlegetset}public string authorgetset}public datetime publishdategetset}public string isbngetset}public int wordscountgetset}public decimal unitpricegetset}public string contentdescriptiongetset}public string aurhordescriptiongetset}public string editorcommentgetset}public string tocgetset}public int clicksgetset}#endregion//定义一个接口ilistgetallbooks(); void modifycatagory(string ids, string catagory); //获得所有书本的方法 public ilist getallbooks() { ilist booklist = new list(); string sql = "select top 20 * from books order by publishdate desc"; int categoryid; int publisherid; using (datatable dt = dbhelper.getdataset(sql)) { foreach (datarow row in dt.rows) { book book = new book(); book.id = (int)row["id"]; book.title = (string)row["title"]; book.author = (string)row["author"]; book.publishdate = (datetime)row["publishdate"]; book.isbn = (string)row["isbn"]; book.wordscount = (int)row["wordscount"]; book.unitprice = (decimal)row["unitprice"]; book.contentdescription = (string)row["contentdescription"]; book.aurhordescription = (string)row["aurhordescription"]; book.editorcomment = (string)row["editorcomment"]; book.toc = (string)row["toc"]; book.clicks = (int)row["clicks"]; publisherid = (int)row["publisherid"]; //fk categoryid = (int)row["categoryid"]; //fk book.category = categoryservice.getcategorybyid(categoryid); book.publisher = publisherservice.getpublisherbyid(publisherid); booklist.add(book); } } return booklist; } public static ilist getallbooks() { return bookservice.getallbooks(); } 自己在稍作修改,就ok了
4 , 图书馆座位管理系统C源代码#include#include#include#includeusing namespace std;void mainmenu();void manage_book();void input_book();void input_reader();void new_book();void seek_book();void borrow_manage();void borrow_book();void return_book();void output_message();void exit_system();int u,v=3,k=0;struct bookchar name[20];int booknumber;int num_present;int num_all;}book[1000];struct readerchar name[20];int readernumber;int card;}reader[3];void mainmenu() int num_choice1,flag=1;system("color e"); for(;k<=0;k++)input_book();input_reader(); } while(flag==1)system("cls");cout<<"\t\t\t◆◆◆◆◆主菜单◆◆◆◆◆"<<<"\t\t\t☆1.图书管理☆"<<<"\t\t\t☆2.借阅管理☆"<<<"\t\t\t☆3.输出信息☆"<<<"\t\t\t☆4.退出系统☆"<<<"\t\t\t◆◆◆◆◆◆◆◆◆◆◆◆◆"<cout<<"请输入所需要的服务编码"<cin>>num_choice1;switch(num_choice1)case 1:manage_book();break;case 2:borrow_manage();break;case 3:output_message();break;case 4:exit_system();flag=0;break;default:flag=0;cout<<"输入有误!!"<} }}void manage_book() int flag1=1,num_choice2; system("cls"); while(flag1==1)cout<<"\t\t\t◆◆◆◆◆◆◆◆◆◆◆◆◆"<<<"\t\t\t☆1.新书入库☆"<<<"\t\t\t☆2.图书查询☆"<<<"\t\t\t☆3.返回主菜单☆"<<<"\t\t\t◆◆◆◆◆◆◆◆◆◆◆◆◆"<cin>>num_choice2;switch(num_choice2)case 1:flag1=2;new_book();break;case 2:flag1=2;seek_book();break;case 3:mainmenu();default:flag1=1;cout<<"输入有误!"<system("pause");system("cls");} }}void input_book() cout<<"请依照提示输入现有的三本图书的信息:"<for(int i=0;i<3;i++)cout<<"书名:"<cin>>book[i].name;cout<<"书号:"<cin>>book[i].booknumber;cout<<"库存量:"<cin>>book[i].num_all;cout<<"现存量:"<cin>>book[i].num_present;}}void new_book() system("cls");int j;char newbook_name[20];cout<<"请输入新书书名:"<cin>>newbook_name;for(j=0;j<1000;j++)if(strcmp(newbook_name,book[j].name)==0)book[j].num_all++;book[j].num_present++;break;}}if(j==1000)cout<<"请为此新书编号:"<v++;cin>>book[v].booknumber;strcpy(book[v].name,newbook_name);book[v].num_all=1;book[v].num_present=1;} else cout<<"已有此书,库存量加一"<system("pause");}void seek_book() system("cls");int k,booknumber;cout<<"请输入所要查询的书号:"<cin>>booknumber;for(k=0;k<1000;k++)if(book[k].booknumber==booknumber)cout<<"书号:"<cout<<"书名:"<cout<<"库存量:"<cout<<"现存量:"<system("pause");break;}}if(k==1000)cout<<"未找到此书?。?<system("pause"); }}void borrow_manage() int flag=1; system("cls"); int num_choice3;while(flag==1)cout<<"\t\t\t◆◆◆◆◆◆◆◆◆◆◆◆◆"<<<"\t\t\t☆1.借书登记☆"<<<"\t\t\t☆2.还书管理☆"<<<"\t\t\t☆3.返回主菜单☆"<<<"\t\t\t◆◆◆◆◆◆◆◆◆◆◆◆◆"<cin>>num_choice3;switch(num_choice3)case 1:flag=2;borrow_book();break;case 2:flag=2;return_book();break;case 3:mainmenu();default:flag=1;cout<<"输入有误!!"<system("pause");}system("cls"); }}void input_reader() system("cls");cout<<"请依照提示输入现有的三位读者的信息:"<for(int m=0;m<3;m++)cout<<"姓名:"<cin>>reader[m].name;cout<<"编号:"<cin>>reader[m].readernumber;reader[m].card=0;}}void borrow_book() system("cls");char reader_name[20];int n,book_number;cout<<"请输入读者姓名:"<cin>>reader_name;for(n=0;n<3;n++)if(strcmp(reader_name,reader[n].name)==0)if(reader[n].card!=0)cout<<"已借书,不能再借,请按任意键返回"<system("pause");mainmenu();}elsebreak;}}if(n==3)cout<<"无此读者!输入有误?。“慈我饧祷刂鞑说?<system("pause");mainmenu();}cout<<"请输入所借图书书号:"<cin>>book_number; for(n=0;nif(strcmp(reader_name,reader[n].name)==0)reader[n].card=book_number;} for(n=0;nif(book[n].booknumber==book_number)if(book[n].num_present==0)cout<<"该书已经被借完,请按任意键返回"<system("pause");for(n=0;nif(strcmp(reader_name,reader[n].name)==0)reader[n].card=0;}mainmenu();}elsebook[n].num_present--;cout<<"借书成功,请按任意键返回"<system("pause");break;}}} if(n==v)for(n=0;nif(strcmp(reader_name,reader[n].name)==0)reader[n].card=0;}cout<<"所输入的书号不存在,请按任意键返回主菜单"<system("pause");mainmenu();}}void return_book() system("cls"); int j;char reader_name[20];int book_number;cout<<"请输入读者姓名:"<cin>>reader_name;for(j=0;j<3;j++)if(strcmp(reader_name,reader[j].name)==0)break;}if(j==3)cout<<"无此读者!输入有误?。“慈我饧祷刂鞑说?<system("pause");mainmenu();}cout<<"请输入所还图书书号:"<cin>>book_number;for(j=0;j<3;j++)if(strcmp(reader_name,reader[j].name)==0)if(book_number==reader[j].card)reader[j].card=0;for(j=0;jif(book[j].booknumber==book_number)book[j].num_present++;cout<<"还书成功,请按任意键返回"<system("pause");break;}}}elsecout<<"该读者未借此书"<system("pause");}}if(j==v)cout<<"所输入的书号不存在:"<}}void output_message() system("cls"); int q; cout<<"以下是图书信息"<for(q=0;qcout<<"书号:"<cout<<"书名:"<cout<<"库存量:"<cout<<"现存量:"<}cout<<"以下是读者信息"<for(q=0;q<3;q++)cout<<"姓名:"<<<"编号:"<<<"所借书号:"<}system("pause");}void exit_system() system("cls"); cout<<"欢迎下次使用 , 谢谢"< system("pause");}void main() mainmenu();}5,C语言图书管理系统原发布者:天使小白很黑图书管理系统设计图书管理信息包括:图书名称、图书编号、单价、作者、存在状态、借书人姓名、性别、学号等功能描述:1.新进熟土基本信息地输入2.图书基本信息地查询3.对撤消图书信息地删除4.为借书人办理注册5.办理借书手续6.办理换书手续要求:以文件方式存储数据,系统以菜单方式工作.这是本人大一第二学期初C语言课程设计地作品,嘿嘿,本来以为已经找不到原稿了,今天无意中竟然在QQ网络硬盘中找到了当初地teta版,发布于此,以作纪念.b5E2RGbCAP C源代码如下:#include#include#includestructbook{charbook_name[30] 。intbianhao 。doubleprice 。charauthor[20] 。charstate[20] 。charname[20] 。charsex[10] 。intxuehao 。structbook*book_next 。} 。structclub{charname[20] 。charsex[10] 。intxuehao 。charborrow[30] 。structclub*club_next 。} 。voidPrint_Book(structbook*head_book> 。/*浏览所有图书信息*/p1EanqFDPwvoidPrint_Club(structclub*head_club> 。/*浏览所有会员信息*/DXDiTa9E3dstructbook*Create_New_Book(> 。/*创建新地图书库,图书编号输入为0时结束*/RTCrpUDGiTstructbook*Search_Book_bianhao(intbianhao,structbook*head_book> 。5PCzVD7HxAstructbook*Search_Book_name(char*b_name,structbook*head_#include<stdio.h> #include<string.h> #include<conio.h> #include<stdlib.h> #include<windows.h>#define LL sizeof(BOOK_TYPE)intmaininterface();void infor_input(); voidrefer();voidrefer_1();voidrefer_2();voidmodify();voiddelete();voidfindbook();voidfindbook1();voidfindbook2();voiddevise();void main()int a=0; doa=maininterface();switch(a)case 1:system("CLS");infor_input();break;case 2:system("CLS");refer();break;case 3:system("CLS");modify();break;case 4:system("CLS");delete();break;case 5:exit(0);default:system("CLS");printf("\n\n\n\n\t\t\t无此操作,请按任意键返回:\n");getch();system("CLS");}}while(a!=6);}int maininterface() int n;printf("\n\n\n\t\t------------欢迎进入图书登记管理系统!-----------\n");printf("\n\t\t\t\t1:<录入图书信息>\n");printf("\n\t\t\t\t2:<查询信息>\n");printf("\n\t\t\t\t3:<修改图书信息>\n");printf("\n\t\t\t\t4:<删除图书信息>\n");printf("\n\t\t\t\t5:<退出系统>\n");printf("\n\t\t\t请输入1--5,其他输入非法!\n");scanf("%d",&n); return n;}typedef struct intmonth; intday; intyear;}DATES; DATES day; typedef struct bookschar bookname[50];char ISBN[50];char author[50];char publisher[50];float money;DATES day;int count; struct books *next;}BOOK_TYPE; BOOK_TYPE ts;struct books *head = NULL;void infor_input() FILE *fp; int n=0;BOOK_TYPE ts;printf("---------------图书资料基本信息录入--------------\n");doprintf("请输入书名\n");scanf("%s",ts.bookname);printf("请输入ISBN\n");scanf("%s",ts.ISBN);printf("请输入作者\n");scanf("%s",ts.author);printf("请输入出版社\n");scanf("%s",ts.publisher);printf("请输入定价\n");scanf("%f",&ts.money);printf("请输入出版日期\n");scanf("%d/%d/%d",&ts.day.month,&ts.day.day,&ts.day.year);printf("请输入数量\n");scanf("%d",&ts.count);printf("\n\t\t\t请选择(1:确定\t2:取消\t0:重新输入):");scanf("%d",&n); }while(n==0);if(n==1)if((fp=fopen("book.txt","a"))==NULL)/* 若"book.txt"文件不存在,则以创建方式打开文件 */fp=fopen("book.txt","w+");}fwrite(&ts,LL,1,fp);/* 将输入的图书信息写入磁盘文件"book.txt" */fclose(fp); }system("CLS");printf("输入成功!\n");printf("请选择(1:返回主界面\t2:输入另一本图书信息\t0:退出系统):\n");scanf("%d",&n);switch(n)case 1:system("CLS");break;case 2:system("CLS");infor_input();break;case 0:break;default:printf("无此操作,按任意键返回\n");getch();system("CLS");break;} }void refer() int n; printf("1:<根据ISBN号,找出图书信息>\n");printf("2:<根据出版社名称,找出所有图书信息>\n");printf("3:<根据书名,找出图书信息>\n");printf("4:<统计书籍总数>\n");printf("5:<统计书籍总金额和平均价格>\n");printf("0:<返回>\n");printf("请输入0--5,其他输入非法!\n"); scanf("%d",&n);switch(n)case 1:system("CLS");findbook();break;case 2:system("CLS");findbook1();break;case 3:system("CLS");findbook2();break;case 4:system("CLS");refer_1();break;case 5:system("CLS");refer_2();break;case 0:system("CLS");break;default:printf("无此操作\n");break; } }struct books *read_1() FILE *fp;struct books *p1,*p2,*head; fp=fopen("book.txt","r");head=p1=(BOOK_TYPE *)malloc(LL);fread(p1,LL,1,fp); while(feof(fp)==0)p2=(BOOK_TYPE *)malloc(LL);fread(p2,LL,1,fp);p1->next=p2;p1=p2; }p1->next=NULL; fclose(fp); return head;}void refer_1() struct books *head,*p,*d; struct books *read_1(); int total=0; head=read_1();for(p=head;p->next!=NULL;d=p,p=p->next,free(d))total=total+p->count; } printf("书籍总数:%d\n",total); printf("按任意键返回");getch();system("CLS");}void refer_2()int num=0;struct books *head,*p1,*p2;struct books *read_1();float total=0,average=0;head=read_1();for(p1=head;p1->next!=NULL;p2=p1,p1=p1->next,free(p2))num=num+p1->count;total=total+p1->money*p1->count;}average=total/num;printf("书籍总金额:%.2f\n",total);printf("书籍平均价格:%.2f\n",average);printf("按任意键返回");getch();system("CLS");}void findbook() FILE *fp; char ISBN[50]; int i; fp=fopen("book.txt","r"); printf("请输入书的ISBN号\n"); scanf("%s",ISBN); for(i=0;fread(&ts,LL,1,fp)!=0;i++)if(strcmp(ISBN,ts.ISBN)==0)printf("这本书的详细资料为:%s %s %s %s %f %d/%d/%d %d\n按任意键返回\n",ts.bookname,ts.ISBN,ts.author,ts.publisher,ts.money,ts.day.month,ts.day.day,ts.day.year,ts.count); } printf("没有你所需要的书籍");fclose(fp);}void findbook1() FILE *fp; char publisher[50];int i; fp=fopen("book.txt","r"); printf("请输入书的publisher\n"); scanf("%s",publisher); for(i=0;fread(&ts,LL,1,fp)!=0;i++)if(strcmp(publisher,ts.publisher)==0)printf("这本书的详细资料为:%s %s %s %s %f %d/%d/%d %d\n按任意键返回\n",ts.bookname,ts.ISBN,ts.author,ts.publisher,ts.money,ts.day.month,ts.day.day,ts.day.year,ts.count); } printf("没有你所需要的书籍");fclose(fp);}void findbook2() FILE *fp; char bookname[50]; int i; fp=fopen("book.txt","r"); printf("请输入书的bookname\n"); scanf("%s",bookname); for(i=0;fread(&ts,LL,1,fp)!=0;i++)if(strcmp(bookname,ts.bookname)==0)printf("这本书的详细资料为:%s %s %s %s %f %d/%d/%d %d\n按任意键返回\n",ts.bookname,ts.ISBN,ts.author,ts.publisher,ts.money,ts.day.month,ts.day.day,ts.day.year,ts.count); } printf("没有你所需要的书籍");fclose(fp);}void delete() struct books *p1, *p2; char ISBN[50];int e=0;if(head == NULL) printf("无书籍记录");return; } printf("请输入您要删除的书籍的ISBN:\n");scanf("%s",ISBN); p1 = head; while(ISBN != p1->ISBN && p1->next != NULL) p2 = p1; p1 = p1->next; } if(ISBN == p1->ISBN) if(p1 == head) head = p1->next; else p2->next = p1->next; free(p1); e--; } else printf("没有该书籍记录,请核对!\n"); } void modify() struct books *p1, *p2; char ISBN[50]; if(head == NULL) printf("无书籍记录!\n"); return; } printf("请输入您要修改的书籍的ISBN\n:"); scanf("%s",ISBN); p1 = head; while(ISBN != p1->ISBN && p1->next != NULL) p2 = p1; p1 = p1->next; } if(ISBN == p1->ISBN) devise(p1); else printf("没有该学生记录,请核对!\n"); } void devise(struct books *p) int choice; choice = -1; do printf("请选择您要修改的书籍的信息内容:\n"); printf("+----------------------+\n"); printf("| 书名 请按 1 |\n"); printf("| ISBN 请按 2 |\n"); printf("| 作者 请按 3 |\n"); printf("|出版社请按 4 |\n"); printf("| 定价 请按 5 |\n"); printf("| 出版日期 请按 6 |\n"); printf("| 数量 请按 7 |\n"); printf("| 取消 请按 0 |\n"); printf("+----------------------+\n"); printf("请输入您的选择:"); scanf("%d", &choice); switch(choice) case 0: return; case 1: printf("请输入新书名 :"); scanf("%s", p->bookname); break; case 2: printf("请输入新ISBN:"); scanf("%s", &p->ISBN); break; case 3: printf("请输入新作者:"); scanf("%s", p->author); break; case 4: printf("请输入新出版社:"); scanf("%s", p->publisher); break; case 5: printf("请输入新定价:"); scanf("%d", p->money); break; case 6: printf("请输入新出版日期 :"); scanf("%ld", &p->day.month,day.day,day.year); break; case 7: printf("请输入新数量:"); scanf("%s", p->count); break; default: printf("\n无效选项!"); break; } } while(choice != 0); }

    推荐阅读