奔驰加长版-本田s2000国内多少钱
2023年11月24日发(作者:哈弗m6通病)
基于顺序表的图书管理系统(C语?)
Visual Studio编译环境
功能:
0、退出。
1、基于顺序存储结构的图书信息表的创建和输出。
2、基于顺序存储结构的图书信息表的新图书的?库。
3、基于顺序存储结构的图书信息表的旧图书的出库。
4、基于顺序存储结构的图书信息表按书号查找。
5、基于顺序存储结构的图书信息表按价格区间查找。
6、基于顺序存储结构的按图书价格升序排序。
7、基于顺序存储结构的按图书价格修改。
8、基于顺序存储结构的按图书价格普调。
9、基于顺序存储结构的按最贵图书查找。
10、基于顺序存储结构的图书去重。
11、遍历。
1#pragma once
2#include \"struct.h\"
3
4#ifndef __FUNCTION_H__
5#define __FUNCTION_H__
6
7int read_books(SqList* L, bool &status);
8Status Traverse(SqList L);
9Status CreateBookList(SqList& L);
7 char reset;
8 if (status == true) {
9 printf(\"Are you sure to reset the list based on documents?(Y/N)a\");
10 getchar();
11 scanf(\"%c\", &reset);
12 if (reset == \'Y\')return OK;
13 else return ERROR;
14 }return OK;
15}
16
17//遍历内容
18Status Traverse(SqList L) {
19 for (int i = 0; i < ; i++) {
20 printf(\"%st%st%.2lf元n\", [i].id, [i].name, [i].price);
21 }
22 printf(\"Current storage space : (% d / % d)n\", , MAXSIZE);
23 return OK;
72
73//3下架旧图书(输?书号)
74Status DeleteBookList(SqList& L) {
75 char isbn[15];
76 if ( < 0) {
77 printf(\"Error:No books on the shelves!an\");
78 return ERROR; //当长度?于0就是未创建内存,不允许删除数据
79 }
80 printf(\"Isbn that you want to delete:\");
81 getchar();
137 if ([i].price >= min_price && [i].price <= max_price) {
138 printf(\"%st%st%.2lfn\", [i].id, [i].name, [i].price);
139 num++;
140 exist = true;
141 }
142 }
143 if (exist == false) {
144 printf(\"ERROR:Books are not available at this price!na\");
145 return ERROR;
146 }
147 printf(\"There are %d books altogether.n\", num);
148 return OK;
202 double sum_price=0;
203 double average;
204 if ( < 0) {
205 printf(\"Error:No book data!an\");
206 return ERROR;
207 }
267}
创建主函数 源?件编写界?并执?程序
1#include
2#include
3#include
4#include
5
6#include \"struct.h\"
7#include \"function_declare.h\"
59 DeleteBookList(L);
60 system(\"pause\");
61 break;
62 case 4:
2014款标致508怎么样-为什么买m6的人最后后悔
更多推荐
开c260l的都是穷人
发布评论