第七周 项目一 建立顺序环形队列
来源:互联网 发布:影楼美工设计教程 编辑:程序博客网 时间:2024/06/07 23:24
目的:建立顺序环形队列。
代码:
#include <iostream>#include <cstdio>#include "shunxuduidetouwenjian.h"using namespace std;int main(){ sqqueue * q; chushihuashunxudui(q); A e; e='a'; jinshunxudui(q,e); e='b'; jinshunxudui(q,e); e='c'; jinshunxudui(q,e); cout<<panduanshunxuduiweikong(q)<<endl; cout<<chushunxudui(q,e)<<endl; cout<<shunxuduichangdu(q)<<endl; e='d'; jinshunxudui(q,e); e='e'; jinshunxudui(q,e); e='f'; jinshunxudui(q,e); cout<<shunxuduichangdu(q)<<endl; while(q->wei!=q->tou) { cout<<q->tou+1<<" "; chushunxudui(q,e); } cout<<endl; cuihuishunxudui(q); return 0;}#include <iostream>#include <cstdio>#include "shunxuduidetouwenjian.h"using namespace std;int main(){ sqqueue * q; chushihuashunxudui(q); A e; e='a'; jinshunxudui(q,e); e='b'; jinshunxudui(q,e); e='c'; jinshunxudui(q,e); cout<<panduanshunxuduiweikong(q)<<endl; cout<<chushunxudui(q,e)<<endl; cout<<shunxuduichangdu(q)<<endl; e='d'; jinshunxudui(q,e); e='e'; jinshunxudui(q,e); e='f'; jinshunxudui(q,e); cout<<shunxuduichangdu(q)<<endl; while(q->wei!=q->tou) { cout<<q->tou+1<<" "; chushunxudui(q,e); } cout<<endl; cuihuishunxudui(q); return 0;}#include <iostream>#include <cstdio>#include "shunxuduidetouwenjian.h"using namespace std;int main(){ sqqueue * q; chushihuashunxudui(q); A e; e='a'; jinshunxudui(q,e); e='b'; jinshunxudui(q,e); e='c'; jinshunxudui(q,e); cout<<panduanshunxuduiweikong(q)<<endl; cout<<chushunxudui(q,e)<<endl; cout<<shunxuduichangdu(q)<<endl; e='d'; jinshunxudui(q,e); e='e'; jinshunxudui(q,e); e='f'; jinshunxudui(q,e); cout<<shunxuduichangdu(q)<<endl; while(q->wei!=q->tou) { cout<<q->tou+1<<" "; chushunxudui(q,e); } cout<<endl; cuihuishunxudui(q); return 0;}
运行图:
阅读全文
0 0
- 第七周项目一 建立顺序环形队列算法库
- 第七周 项目一 建立顺序环形队列算法库
- 第七周-项目一 建立顺序环形队列算法库
- 第七周项目一--建立顺序环形队列算法库
- 第七周 项目一 建立顺序环形队列算法库
- 第七周项目一建立顺序环形队列算法库
- 第七周 项目一建立顺序环形队列算法库
- 第七周 项目一 建立顺序环形队列算法库
- 第七周项目一 建立顺序环形队列算法库
- 第七周项目一 建立顺序环形队列算法库
- 第七周 项目一 建立顺序环形队列算法库
- 第七周 项目一 建立顺序环形队列算法库
- 第七周 项目一 建立顺序环形队列
- 第七周项目一 顺序环形队列
- 第七周 项目一 【顺序环形队列】
- 第七周-栈和队列(二)项目一-建立顺序环形队列算法库
- 第七周项目1-建立顺序环形队列算法库
- 第七周项目1 - 建立顺序环形队列算法库
- Eclipse中创建新的Spring Boot项目
- 自己动手实现一个mvvm库
- Printf函数与Scanf函数学习
- 选择排序
- Hibernate4 命名查询
- 第七周 项目一 建立顺序环形队列
- 刘明春总结《2017年11月2号》【连续第6天总结】
- Hibernate
- C++语言细节点
- oracle单引号和双引号用法
- 安卓单元测试全攻略,让代码测试一劳永逸
- dockerfile介绍
- discoz论坛模板的一些细节记录
- 关于安卓sdk 文件相关