阿拉善左旗汽车网

学校图书管理系统求推荐?求便宜的

    发布时间:2018-07-26 17:43

    百度云盘下载地址:http://pan.baidu.com/s/1bnzRAbl 提取码 g9e6

    操作注意事项
    (1)本系统的用户名为:tsoft,密码为:111
    (2)读者类型不同,可借图书的本数也有所区别。

    希望能采纳!!!!

    回复:

    我的程序有两个问题:
    1. 对错误输入的检查没有做到很好。所以尽量正确输入。
    2. 模糊搜索时是区分大小写的。

    #include <stdio.h>
    #include <stdlib.h>
    #include <conio.h>
    #include <string.h>
    #include <math.h>

    #define MAX_NAME_LEN 64

    static int gCurNo = 0;

    typedef struct _BookInfo
    {
    int no;
    char name[MAX_NAME_LEN + 1];
    int amount;
    struct _BookInfo *next;
    } BookInfo;

    BookInfo* GetBookNode(BookInfo *head, char *name)
    {
    BookInfo *node = head;

    while (node)
    {
    if (strcmp(node->name, name) == 0)
    {
    return node;
    }
    node = node->next;
    }

    return NULL;
    }

    BookInfo* GetPriorNode(BookInfo *head, BookInfo *node)
    {
    BookInfo *prior = head;

    while (prior)
    {
    if (prior->next == node)
    {
    return prior;
    }
    prior = prior->next;
    }

    return NULL;
    }

    void FindBook(BookInfo *head, char *name)
    {
    BookInfo *node = head;

    printf("The book is:\n");
    while (node)
    {
    if (strstr(node->name, name))
    {
    printf("%d, %s, %d\n", node->no, node->name, node->amount);
    }
    node = node->next;
    }

    printf("End.\n");
    }

    void AddBook(BookInfo **head, char *name, int num)
    {
    BookInfo *node;

    if (node = GetBookNode(*head, name))
    {
    node->amount += num;
    //printf("图书%s已在库, 增加一本图书!\n", name);
    }
    else
    {
    /* 新建图书节点 */
    node = (BookInfo *)malloc(sizeof(BookInfo));
    node->no = gCurNo++;
    strcpy(node->name, name);
    node->amount = num;

    /* 把新节点加入链表 */
    if (*head)
    {
    node->next = (*head)->next;
    (*head)->next = node;
    }
    else
    {
    node->next = NULL;
    *head = node;
    }
    //printf("图书%s不在库, 新增一类图书!\n", name);
    }
    }

    void SellBook(BookInfo *head, char *name)
    {
    BookInfo *node;

    if (node = GetBookNode(head, name))
    {
    if (node->amount > 0)
    {
    node->amount--;
    printf("Success!");
    }
    else
    {
    printf("Failed!");
    }
    printf(" The quantity of this book is %d.\n", node->amount);
    }
    else
    {
    printf("Failed! This book has not registered in!\n");
    }
    }

    void ClearBook(BookInfo **head, char *name)
    {
    BookInfo *prior, *node;

    if (node = GetBookNode(*head, name))
    {
    if (node->amount > 0)
    {
    printf("Failed! This book is still in stock!\n");
    }
    else
    {
    if (prior = GetPriorNode(*head, node))
    {
    prior->next = node->next;
    }
    else
    {
    *head = node->next;
    }

    free(node);

    printf("Success! This book is cleared!\n", name);
    }
    }
    else
    {
    printf("Failed! This book has not registered in!\n", name);
    }
    }

    void PrintAmountOfAllBook(BookInfo *head)
    {
    int amount = 0;
    BookInfo *node = head;

    while (node)
    {
    amount += node->amount;
    node = node->next;
    }

    printf("库存图书的数量总和为%d\n", amount);
    }

    void main()
    {
    int op, num;
    char buffer[1024], name[MAX_NAME_LEN + 1], comma;
    BookInfo *head = NULL;

    do
    {
    printf(
    "\nPlease input your choice:\n1. Add Book\n2. Find Book\n3. Sell Book\n4. Clear Book\n5. Get Statistics\n0. Exit\nYour choice: "
    );

    do
    {
    op = getch();
    }
    while (op < '0' || op > '5');
    putchar(op);
    putchar('\n');

    switch (op)
    {
    case '1':
    printf("Please input the first book: ");
    do
    {
    fgets(buffer, 1024, stdin);
    fflush(stdin);
    if (buffer[0] == '0' && buffer[1] == '\n')
    {
    printf("Success!\n");
    break;
    }
    sscanf(buffer, "%[^,]%c%d", name, &comma, &num);
    AddBook(&head, name, num);
    printf("Please input the next book(0 end): ");
    }
    while (1);
    break;
    case '2':
    printf("Please input the book to find: ");
    fgets(name, MAX_NAME_LEN + 1, stdin);
    fflush(stdin);
    name[strlen(name) - 1] = '\0';
    FindBook(head, name);
    break;
    case '3':
    printf("please input the book to sell: ");
    fgets(name, MAX_NAME_LEN + 1, stdin);
    fflush(stdin);
    name[strlen(name) - 1] = '\0';
    SellBook(head, name);
    break;
    case '4':
    printf("please input the book to clear: ");
    fgets(name, MAX_NAME_LEN + 1, stdin);
    fflush(stdin);
    name[strlen(name) - 1] = '\0';
    ClearBook(&head, name);
    break;
    case '5':
    PrintAmountOfAllBook(head);
    break;
    }
    }
    while (op != '0');

    printf("Now exit!\n");
    getch();
    }

    回复:

    用ACCESS做的,有的

    回复:

    学校图书管理系统 都是收费的 价格按学校的规模 一般在2-10万左右 你想拿100财富 就买 可能吗?

    回复:

    百度云盘下载地址:http://pan.baidu.com/s/1bnzRAbl 提取码 g9e6 操作注意事项 (1)本系统的用户名为:tsoft,密码为:111 (2)读者类型不同,可借图书的本数也有所区别。 希望能采纳!!!!

    回复:

    维克图书管理软件是一款适用于中小企业、事业机关单位和学校社区等部门的图书馆借阅室使用的数据库信息管理系统,功能包括图书期刊资料管理、图书期刊借阅、归还、续借和注销等业务流程,同时支持读者押金充值及借阅超期罚款管理功能;软件提供...

    回复:

    用数据库2000的会不会太老了,2005的可以吗?我这有做好的图书管理系统,以及班级管理系统,学生管理系统等等

    上一篇:蜀商油投资多少资金合适 下一篇:长安第二代逸动即将上市,它与逸动XT有什么区别

    返回主页:阿拉善左旗汽车网

    本文网址:http://0483auto.cn/view-208435-1.html
    信息删除