纯c语言图书管理系统源码,图书管理系统源代码--纯C语言..doc

#include

#include

#include

#include

#define NULL 0

#define LEN sizeof(Book)

struct A

{char Name[20];

int all,left,borrow;

struct A *next;

};

typedef struct A Book;

int Display_Main_Menu(); /*主菜单显示*/

Book *Create(); /*功能函数声明*/

void Display(Book *head);

Book *Insert(Book *head,Book *s);

Book *Insert_a_record(Book *head);

Book *Delete(Book *head,char *name);

Book *Delete_a_record(Book *head);

Book *Borrow(Book *head,char *name,int sum);

Book *Borrow_a_Book(Book *head);

Book *Return(Book *head,char *name,int sum);

Book *Return_a_Book(Book *head);

Book *Query(Book *head,char *name);

void Query_a_record(Book *head);

Book *AddfromText(Book *head,char *filename);

Book *WritetoText(Book *head,char *filename);

void Quit(Book *head);

void main() /*主函数部分*/

{Book *head; /*定义变量*/

char filename[20];

int keyword=111,a;

printf("Please input keyword:");

scanf("%d",&a);

if(a!=keyword) exit(0);

else printf("Welcome!");

head=NULL; /*置首指针为空*/

for(;;)

{

switch(Display_MainMenu())

{

case 1:printf("1.Create BookList\n"); /*调用Create函数创建链表*/

head=Create();

system("pause");

break;

case 2:printf("Display All Books\n");

Display(head); /*调用Display函数显示所有*/

system("pause");break;

case 3:printf("Insert a Record\n");

head=Insert_a_record(head);/*调用Insert_a_record函数插入*/

system("pause");break;

case 4:printf("Delete a Book\n");

head=Delete_a_record(head);/*调用Delete_a_record函数删除*/

system("pause");break;

case 5:printf("Borrow a Book\nInput BookName and sum you borrow:");

head=Borrow_a_Book(head);

system("pause");break;

case 6:printf("Return a Book\nInput BookName and sum you return:");

head=Return_a_Book(head);

system("pause");break;

case 7:printf("Query\nInput the BookName you want:");

Query_a_record(head);/*调用查询函数*/

system("pause");break;

case 8:printf("Input the nam

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值