资源简介
我大一做的系统,能完整实现图书馆的基本功能:借书、还书、查询、删除、修改等。
代码片段和文件信息
#include
#include
#include
struct book
{
char book_name[30];
int ID;
double price;
char author[20];
char state[20];
char name[20];
char sex[10];
int studnum;
struct book *book_next;
};
struct student
{
char name[20];
char sex[10];
int studnum;
char borrow[30];
struct student *student_next;
};
void Print_Book(struct book *head_book);/*浏览所有图书信息*/
void Print_Student(struct student*head_student);/*浏览所有学生信息*/
struct book *Create_New_Book();/*创建新的图书库,图书编号输入为0时结束*/
struct book *Search_Book_ID(int IDstruct book *head_book);
struct book *Search_Book_name(char *b_namestruct book *head_book);
struct book *Insert_Book(struct book *head_bookstruct book *stud_book);/*增加图书,逐个添加*/
struct book *Delete_Book(struct book *head_bookint ID);/*删除图书*/
struct student *Create_New_Student();
struct student *Search_Student_studnum(int studnumstruct student *head_student);
struct student *Search_Student_name(char *s_namestruct student *head_student);
struct student *Insert_Student(struct student *head_studentstruct student *stud_club);
struct student *Delete_Student(struct student *head_studentint studnum);
struct book *Lent_Book(int IDint studnumstruct book *head_bookstruct student *head_student);
struct book *back(int IDint studnumstruct book *head_bookstruct student *head_student);
int main()
{
struct book *head_book*p_book;
char book_name[30]name[20]author[20]sex[10];
int ID;
double priceprice_hprice_l;
int size_book=sizeof(struct book);
int m=1n=1fhoxy;
char *b_name*s_name;
struct student *head_student*p_student;
int studnum;
int size_student=sizeof(struct student);
int choice;
loop:
printf(“\n\t\t\t〓〓〓〓〓图书管理系统〓〓〓〓〓\n\n“);
printf(“\n“);
printf(“please choice your position :\n“);
printf(“\t\t\t[1]:管理员\t“);
printf(“\n\n\n“);
printf(“\t\t\t[2]:学生\t“);
printf(“\n\n\n“);
printf(“\t\t\t[0]:退出\n\n“);
printf(“\n\n\n“);
printf(“第一次进入图书管理系统请先选1!!!\n\n“);
printf(“请选择<0--2>:\n“);
scanf(“%d“&choice);
printf(“\n\t\t\t〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓\n\n\n\n“);
while(choice!=0)
{
switch(choice)
{
loopg: case 1:
printf(“1.新增书库和学生库\n\n“);
printf(“2.增加图书\n\n“);
printf(“3.删除图书\n\n“);
printf(“4.查看所有学生信息\n\n“);
printf(“5.查找学生\n\n“);
printf(“6.增加学生\n\n“);
printf(“0.返回主菜单\n\n“);
printf(“第一次进入图书管理系统请先选1!!!\n\n“);
printf(“请选择:\n\n“);
scanf(“%d“&h);
system(“cls“);
if (h==1)
{
printf(“\n欢迎您第一次进入图书管理系统!\n\n“);
printf(“----->[向导]----->[新建图书库]\n\n“);
printf(“注意:当输入图书编号为0时进入下一步.\n\n“);
head_book=Create_New_Book();
printf(“\n欢迎您第一次进入图书管理系统!\n\n“);
printf(“----->[向导]----->[新建学生库]\n\n“);
printf(“注意:当输入学生学号为0时进入主菜单.\n\n“);
head_student=Creat
- 上一篇:语义分析实验报告和代码
- 下一篇:wanlix mindows操作系统源码
相关资源
- 操作系统c语言模拟文件管理系统844
- C语言开发实战宝典
- C++中头文件与源文件的作用详解
- C语言代码高亮html输出工具
- 猜数字游戏 c语言代码
- C语言课程设计
- 数字电位器C语言程序
- CCS FFT c语言算法
- 使用C语言编写的病房管理系统
- 通信过程中的RS编译码程序(c语言)
- 计算机二级C语言上机填空,改错,编
- 用回溯法解决八皇后问题C语言实现
- 简易教务管理系统c语言开发文档
- 操作系统课设 读写者问题 c语言实现
- 小波变换算法 c语言版
- C流程图生成器,用C语言代码 生成C语
- 3des加密算法C语言实现
- 简单的C语言点对点聊天程序
- 单片机c语言源程序(51定时器 八个按
- 个人日常财务管理系统(C语言)
- c语言电子商务系统
- 小甲鱼C语言课件 源代码
- 将图片转换为C语言数组的程序
- C语言实现的一个内存泄漏检测程序
- DES加密算法C语言实现
- LINUX下命令行界面的C语言细胞游戏
- 用单片机控制蜂鸣器播放旋律程序(
- 学校超市选址问题(数据结构C语言版
- 电子时钟 有C语言程序,PROTEUS仿真图
- 尚观培训linux许巍老师关于c语言的课
评论
共有 条评论