C语言通路寻找,用C语言解决迷宫问题设计与寻找通路问题.pdf

用c语言解决迷宫设计与寻找通路问题

摘 要:本课程设计主要解决设计一个迷宫以及在给出一组入口和出口的情况下,求出一条通路的问题。在课程

设计中,程序设计语言采用VisualC++6.0,数据结构采用顺序栈存储结构,程序运行平台为Windows98/2000/XP。

对于迷宫设计问题,首先假设了用“0”表示此道路可通,“1”表示不可通,即障碍,然后采用了简单的以时间

产生随机变量 (0,1变量)和人工输入0-1变量的方法产生迷宫矩阵。对求解迷宫通路问题,采用“穷举求解”

的方法和设计一个“先进后出”的栈来存放当前位置路径,最后得出一条行走迷宫的通路。在程序设计中,采用

了结构化与面向对象两种解决问题的方法。程序通过调试运行,初步实现了设计目标。

关键词 :程序设计;C++6.0;顺序栈存储结构;穷举求解

Abstract:Thiscoursedesign main solving design amaze andgiven a set ofinlet and outlet.Inthe courseofdesign.

Programming languageusedVisual C++ 6.0 .Data structureandthe storage structure order stack.Programrunning

platform for Windows98/2000/XP.For amaze designproblem.That firstwith "0"saystheroadcan connect."1"mean

not expert..Isnamely obstacles.Andthenusing simpletotimeproducerandomvariables(0, 1variables) and artificial

0-1variablemethodhasthemazematrix. Solvingtheproblem ofmazepathways.The "poor for solving"themethod

and design a "advanced after a"stack to storethecurrent positionpath.Finally draw awalk the accessofthemaze.In

programming.The structural and object-orientedtwokindsofmethodsto solvetheproblems.Program through the

debug operation.Then realizedthedesign goal.

Keywords:Program design;C++6.0;Storage structureorder stack;Poor for solving.

1

目 录

第一章 引言 …………………………………………………………………………………………………………………………………………….……..3

1.1 课程设计目的………………………………………………………………………………………………………………………….….……..….3

1.2 课程设计内容 ………………………………………………………………..………………………………………………3

1.3 概要设计 ………………………………………………………………………………………………………………………..…….…………..…3

第二章 程序设计说明 …………………………………………………………………………………………………………………….….………….5

2.1 定义抽象数据类型 ……………………………………………………………………………………………………….………………5

2.2定义栈结构体及二维数组 …………………………………………………………………….……………………….…..….…………5

2.3 主程序模块 ……………………………………………………………………………………………….……………………..………………6

第三章 详细设计实现 …………………………………………….………………………………………………………………..……….…………..7

3.1 流程图 ..…………………………………………………………………………………………………………….………………………

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值