C语言通路寻找,用C语言解决迷宫问题设计与寻找通路问题.pdf
用c語(yǔ)言解決迷宮設(shè)計(jì)與尋找通路問題
摘 要:本課程設(shè)計(jì)主要解決設(shè)計(jì)一個(gè)迷宮以及在給出一組入口和出口的情況下,求出一條通路的問題。在課程
設(shè)計(jì)中,程序設(shè)計(jì)語(yǔ)言采用VisualC++6.0,數(shù)據(jù)結(jié)構(gòu)采用順序棧存儲(chǔ)結(jié)構(gòu),程序運(yùn)行平臺(tái)為Windows98/2000/XP。
對(duì)于迷宮設(shè)計(jì)問題,首先假設(shè)了用“0”表示此道路可通,“1”表示不可通,即障礙,然后采用了簡(jiǎn)單的以時(shí)間
產(chǎn)生隨機(jī)變量 (0,1變量)和人工輸入0-1變量的方法產(chǎn)生迷宮矩陣。對(duì)求解迷宮通路問題,采用“窮舉求解”
的方法和設(shè)計(jì)一個(gè)“先進(jìn)后出”的棧來(lái)存放當(dāng)前位置路徑,最后得出一條行走迷宮的通路。在程序設(shè)計(jì)中,采用
了結(jié)構(gòu)化與面向?qū)ο髢煞N解決問題的方法。程序通過調(diào)試運(yùn)行,初步實(shí)現(xiàn)了設(shè)計(jì)目標(biāo)。
關(guān)鍵詞 :程序設(shè)計(jì);C++6.0;順序棧存儲(chǔ)結(jié)構(gòu);窮舉求解
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 課程設(shè)計(jì)目的………………………………………………………………………………………………………………………….….……..….3
1.2 課程設(shè)計(jì)內(nèi)容 ………………………………………………………………..………………………………………………3
1.3 概要設(shè)計(jì) ………………………………………………………………………………………………………………………..…….…………..…3
第二章 程序設(shè)計(jì)說(shuō)明 …………………………………………………………………………………………………………………….….………….5
2.1 定義抽象數(shù)據(jù)類型 ……………………………………………………………………………………………………….………………5
2.2定義棧結(jié)構(gòu)體及二維數(shù)組 …………………………………………………………………….……………………….…..….…………5
2.3 主程序模塊 ……………………………………………………………………………………………….……………………..………………6
第三章 詳細(xì)設(shè)計(jì)實(shí)現(xiàn) …………………………………………….………………………………………………………………..……….…………..7
3.1 流程圖 ..…………………………………………………………………………………………………………….………………………
總結(jié)
以上是生活随笔為你收集整理的C语言通路寻找,用C语言解决迷宫问题设计与寻找通路问题.pdf的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: c语言指针实现字符串倒序输出,菜鸟求助-
- 下一篇: c语言编程学生管理系统的代码,C语言学生