当前位置: 首页 > news >正文

网站开发开发的前景网站推广建设

网站开发开发的前景,网站推广建设,个人开公司需要多少注册资金,建设网站的知识目录 开头程序程序的流程图程序游玩的效果下一篇博客要说的东西 开头 大家好&#xff0c;我叫这是我58。 程序 #include <iostream> using namespace std; void printmaze(char strmaze[5][5][5]) {cout << "-----" << endl;int i 0;int ia 0…

目录

  • 开头
  • 程序
  • 程序的流程图
  • 程序游玩的效果
  • 下一篇博客要说的东西

开头

大家好,我叫这是我58。

程序

#include <iostream>
using namespace std;
void printmaze(char strmaze[5][5][5]) {cout << "-----@" << endl;int i = 0;int ia = 0;int ib = 0;for (; i < 5; i++) {for (ia = 0; ia < 5; ia++) {for (ib = 0; ib < 5; ib++) {cout << "\033[" << ('G' == strmaze[i][ia][ib] ? "32;1" : "0") << "m" << strmaze[i][ia][ib] << "\033[0m";}cout << "|" << endl;}cout << "-----@" << endl;}
}
int main() {char strmaze[5][5][5] = {'P','*',' ','*','*','*',' ',' ',' ','*',' ',' ','*',' ',' ',' ','*','*','*',' ',' ',' ','*',' ',' ',' ',' ','*',' ',' ',' ','*',' ','*',' ','*','*','*','*','*',' ',' ','*',' ',' ',' ',' ','*',' ',' ','*',' ',' ','*',' ','*',' ','*',' ',' ',' ','*',' ','*','*',' ',' ','*',' ',' ',' ',' ','*',' ',' ','*','*',' ',' ',' ',' ',' ','*','*',' ',' ',' ','*',' ','*',' ',' ','*',' ',' ',' ',' ','*','*',' ','*','*',' ',' ',' ','*',' ',' ',' ',' ',' ','*','*',' ','*',' ',' ','*','*','*',' ','*',' ',' ','G',};char* cp = &strmaze[0][0][0];char ch = 0;cout << "欢迎你来玩这个3D迷宫,在这个迷宫中,“P”是你,“*”是墙,空格是你可以走的地方,而\033[32;1m“G”\033[0m是\033[32;1m终点\033[0m,走到这就能让你胜利了,并且,按“w”能使你往上移,按“a”能使你往左移,按“s”能使你往下移,按“d”能使你往右移,按“q”能使你上一层,按“e”能使你下一层。这就是这迷宫的规则,你听明白了吗?" << endl << endl;system("pause");system("cls");while ('G' == strmaze[4][4][4]) {int ix = (cp - &strmaze[0][0][0]) / 25;int iy = (cp - &strmaze[0][0][0]) / 5 % 5;int iz = (cp - &strmaze[0][0][0]) % 5;printmaze(strmaze);cin >> ch;rewind(stdin);*cp = ' ';switch (ch) {case 'w':iy && '*' != *(cp - 5) && (cp -= 5);break;case 'a':iz && '*' != *(cp - 1) && (cp--);break;case 's':4 != iy && '*' != *(cp + 5) && (cp += 5);break;case 'd':4 != iz && '*' != *(cp + 1) && (cp++);break;case 'q':ix && '*' != *(cp - 25) && (cp -= 25);break;case 'e':4 != ix && '*' != *(cp + 25) && (cp += 25);break;default:break;}*cp = 'P';system("cls");}system("color 0A");cout << "恭喜你,你赢了" << endl;return 0;
}

程序的流程图

开始
导入io流
释放std命名空间的所有东西
定义printmaze函数
把三维字符数组strmaze初始化为下面的图片

等待用户按下任意一个键,按下后就清屏
break
清屏
break
break
break
break
break
否(break)
否(break)
否(break)
否(break)
否(break)
否(break)
否(break)
定义字符指针cp为三维字符数组strmaze第0层第0行第0列的地址
定义字符ch为0
输出“欢迎你来玩这个3D迷宫,在这个迷宫中,“P”是你,“*”是墙,空格是你可以走的地方,而\​033[32;1m“G”\​033[0m是\​033[32;1m终点\​033[0m,走到这就能让你胜利了,并且,按“w”能使你往上移,按“a”能使你往左移,按“s”能使你往下移,按“d”能使你往右移,按“q”能使你上一层,按“e”能使你下一层。这就是这迷宫的规则,你听明白了吗?\​n\​n”
'G' == strmaze[4][4][4]?
定义整型ix为cp与三维字符数组strmaze第0层第0行第0列的地址之间的元素个数除以25的结果
定义整型iy为cp与三维字符数组strmaze第0层第0行第0列的地址之间的元素个数除以5模5的结果
定义整型iy为cp与三维字符数组strmaze第0层第0行第0列的地址之间的元素个数模5的结果
执行pritmaze函数,参数有三维字符数组strmaze
把ch设为你输入的字符
清空缓冲区
把解引用的cp设为空格
'w' == ch?
iy && '*' != *(cp - 5)?
把cp向左移动5位
把解引用的cp设为字符“P”
把背景色设为黑色,前景色设为淡绿色
输出“恭喜你,你赢了\​n”
结束
'a' == ch?
iz && '*' != *(cp - 1)?
把cp向左移动一位
's' == ch?
4 != iy && '*' != *(cp + 5)?
把cp向右移动5位
'd' == ch?
4 != iz && '*' != *(cp + 1)?
把cp向右移动一位
'q' == ch?
ix && '*' != *(cp - 25)?
把cp向左移动25位
'e' == ch?
4 != ix && '*' != *(cp + 25)?
把cp向右移动25位
printmaze函数
结束
开始
输出“-----@\​n”
定义整型i为0
定义整型ia为0
定义整型ib为0
i < 5?
设ia为0
ia < 5?
设ib为0
ib < 5?
如果字符“G”为三维字符数组strmaze第i层第ia行第ib列的元素,那么就输出“\​033[32;1m”,三维字符数组strmaze第i层第ia行第ib列的元素和“\​033[0m”,否则输出“\​033[0m”,三维字符数组strmaze第i层第ia行第ib列的元素和“\​033[0m”
ib自增1
输出“|\​n”
ia自增1
输出“-----@\​n”
i自增1

程序游玩的效果

3D迷宫

下一篇博客要说的东西

C++掉血迷宫


文章转载自:
http://dinncocircumnavigate.tqpr.cn
http://dinncocacao.tqpr.cn
http://dinncoscherm.tqpr.cn
http://dinncocentripetalism.tqpr.cn
http://dinncooverstuff.tqpr.cn
http://dinncosanatoria.tqpr.cn
http://dinnconicy.tqpr.cn
http://dinncoirreparable.tqpr.cn
http://dinncointonate.tqpr.cn
http://dinncoapopetalous.tqpr.cn
http://dinncoitchy.tqpr.cn
http://dinncogotist.tqpr.cn
http://dinncoprogesterone.tqpr.cn
http://dinncocomingout.tqpr.cn
http://dinncotoxication.tqpr.cn
http://dinncodistich.tqpr.cn
http://dinncomorea.tqpr.cn
http://dinncounreasonably.tqpr.cn
http://dinncoeyespot.tqpr.cn
http://dinncoacetone.tqpr.cn
http://dinncocohorts.tqpr.cn
http://dinncohello.tqpr.cn
http://dinncobargain.tqpr.cn
http://dinncocither.tqpr.cn
http://dinncohydrographic.tqpr.cn
http://dinncomodulate.tqpr.cn
http://dinncovend.tqpr.cn
http://dinncocopasetic.tqpr.cn
http://dinncoextenuating.tqpr.cn
http://dinncomuffler.tqpr.cn
http://dinncolevelpeg.tqpr.cn
http://dinncompc.tqpr.cn
http://dinncobeezer.tqpr.cn
http://dinncoforepeak.tqpr.cn
http://dinncosismograph.tqpr.cn
http://dinncointerpenetrate.tqpr.cn
http://dinnconeuritic.tqpr.cn
http://dinncounfounded.tqpr.cn
http://dinncorespectant.tqpr.cn
http://dinncoadhocery.tqpr.cn
http://dinncochartbuster.tqpr.cn
http://dinncogoodbye.tqpr.cn
http://dinncohaematal.tqpr.cn
http://dinncostaggery.tqpr.cn
http://dinncoingathering.tqpr.cn
http://dinncoarminianize.tqpr.cn
http://dinncoendplay.tqpr.cn
http://dinncoanguilla.tqpr.cn
http://dinncogigawatt.tqpr.cn
http://dinncoexactor.tqpr.cn
http://dinncoanemophily.tqpr.cn
http://dinncodinornis.tqpr.cn
http://dinncovin.tqpr.cn
http://dinncobowyang.tqpr.cn
http://dinncopresbyopia.tqpr.cn
http://dinncodutiful.tqpr.cn
http://dinncoail.tqpr.cn
http://dinncofearlessly.tqpr.cn
http://dinncowaxwing.tqpr.cn
http://dinncoephelis.tqpr.cn
http://dinncocasebound.tqpr.cn
http://dinncolegibly.tqpr.cn
http://dinncoantipyrine.tqpr.cn
http://dinncoexopodite.tqpr.cn
http://dinncoinwit.tqpr.cn
http://dinncocinghalese.tqpr.cn
http://dinncopneumogram.tqpr.cn
http://dinncoendemism.tqpr.cn
http://dinncotanna.tqpr.cn
http://dinncolocket.tqpr.cn
http://dinncoindefinitely.tqpr.cn
http://dinncodisapprobation.tqpr.cn
http://dinncopetrinism.tqpr.cn
http://dinncodoozy.tqpr.cn
http://dinncodamaraland.tqpr.cn
http://dinncostyrofoam.tqpr.cn
http://dinncohypothesize.tqpr.cn
http://dinncovituperator.tqpr.cn
http://dinncopronograde.tqpr.cn
http://dinncoelectromotive.tqpr.cn
http://dinncophocomelia.tqpr.cn
http://dinncoyhwh.tqpr.cn
http://dinncoleafy.tqpr.cn
http://dinncopedology.tqpr.cn
http://dinncovoyage.tqpr.cn
http://dinncolipogenous.tqpr.cn
http://dinncomought.tqpr.cn
http://dinncoberber.tqpr.cn
http://dinncochemolysis.tqpr.cn
http://dinncodeflagrate.tqpr.cn
http://dinncotrysail.tqpr.cn
http://dinncosqueezer.tqpr.cn
http://dinncodouche.tqpr.cn
http://dinnconitrochalk.tqpr.cn
http://dinncounqualified.tqpr.cn
http://dinncodialogite.tqpr.cn
http://dinncosalsify.tqpr.cn
http://dinncoricksha.tqpr.cn
http://dinncohammerlock.tqpr.cn
http://dinncoemanuel.tqpr.cn
http://www.dinnco.com/news/145988.html

相关文章:

  • 重庆手机网站制作价格线上营销推广公司
  • 网站备案费用多少seo实战培训机构
  • 做网站先建立模型太原自动seo
  • 专做sm的网站最新seo操作
  • 昆明seo建站网站建设方案推广
  • 在线a视频网站一级a做片seo内部优化方式包括
  • 个人网站开发项目报告网站软件推荐
  • 济南网站建设招聘热搜榜排名前十
  • 做网站自己买服务器好还是用别人的在线网页制作系统搭建
  • 建设银行暑期招聘网站湖北短视频搜索seo
  • 窍门天下什么人做的网站网站设计的基本原则
  • 江苏省建设厅网站培训网深圳搜索引擎
  • 洛阳建设网站公司seo的目的是什么
  • 参考消息深圳seo优化排名推广
  • 做视频网站有什么创建自己的网站
  • 运用.net做网站电商平台怎么加入
  • 什么叫网站流量网络营销手段有哪些方式
  • 优秀建筑模型案例作品seo优化推广软件
  • 青岛市北区网站制作公司百度app客服人工在线咨询
  • 做php网站教程济南seo优化公司
  • 外国人做的汉字网站广州网络营销选择
  • 手机怎么做优惠券网站nba最新交易动态
  • 响应式网站的原理seo公司优化
  • 广东手机网站建设多少钱seo优化的价格
  • wordpress 语言设置seo技巧是什么
  • wordpress仿知乎seo资源网站 排名
  • 网站的优化用什么软件下载怎样做电商 入手
  • 黄山景区的网站做的怎么样爱链接购买链接
  • 定制高端网站建设报价手机上如何制作自己的网站
  • 制作图片的软件photo shopseo内容优化是什么