C语言基础上的图书管理系统

本文介绍了一个基于C语言的图书管理系统,该系统利用结构体、文件操作和指针技术进行设计,旨在提供参考和学习价值。
摘要由CSDN通过智能技术生成

这是一个C语言基础上的图书管理系统,对于结构体,文件,指针用的比较多,希望具有参考价值!!!!!!!!!!!!!!!!!!!


/*THE LIBRARY*/

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


/********The definition of book structure********/
 typedef struct booklist
{
    char author[20];    /*  author */
    char name[20];      /*  name   */
    char topic[20];     /*  topic  */
    char ISBN[20];      /*  ISBN   */
    char state[20];     /*  state  */
    char num[20];        /*  nummber  */
    char position[20];   /*  position */
}booklist;

char state[5][20];     /*  state  */


void ShowMain0()
{
   system("cls"); /*cls*/
   printf(" Tips: Enter the next step\n\n");
   printf(" Tips: You can now enter the book information, you can follow the message input has the title,author, subject, ISBN, and now the state, the number of locations.\n");
   printf(" Now please enter your registration book information.\n\n");
   system("PAUSE");
}


void ShowMain1()
{
   	 printf("\n\t\t     THE LIBRAY(Support Chinese Input)\n");
     printf("    |^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^|\n");
     printf("    |   1:I will borrow this book.                         |\n");
     printf("    |   2:I will not borrow this book.                     |\n");
     printf("    |   0:Return                                           |\n");
     printf("     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n");
     printf("\n Tips: Enter the next step ");
     printf("\n");
}

void ShowMain2()
{
   	 printf("\n\t\t     THE LIBRAY(Support Chinese Input)\n");
     printf("    |^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^|\n");
     printf("    |   1:I will return this book.                         |\n");
     printf("    |   2:I will renew this book.                          |\n");
     printf("    |   0:Return                                           |\n");
     printf("     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n");
     printf("\n Tips: Enter the next step ");
     printf("\n");
}

void ShowMain3()
{
    system("cls"); /*cls*/
    printf("Tips:Enter the next step\n");
    printf("You will get the information of the book.\n\n");
}





/********************************** Seek the information of books *******************************/


void SeekBook()
{
  FILE *fp;
  booklist *OutInfo;
  char findname[20];
  printf("Please input the book taht you want:");
  scanf("%s",findname);
  fp=fopen("
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值