Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

pls write help me this questiin with C language Project Final_85b52a0...8563cd86a9dd9b08b - Chi c ng nhp chnh sa v lu thay i cho tp ...

image text in transcribed

image text in transcribed

pls write help me this questiin with C language

Project Final_85b52a0...8563cd86a9dd9b08b - Chi c ng nhp chnh sa v lu thay i cho tp ... " 108-1 Programming Language Final Project Problem 1 Please write a program to find out and print out the path to escape a maze. For example, a maze map is shown in Fig. I where the entrance and the exit are marked by the arrows. In Fig. 1 the wall is marked by the GRAY block and the path is marked by the BLACK block. The result of executing your program is shown in Fig. 2 where the escape path is found and printed. To be specific, the escape path shown in Fig. 2 is printed using the symbol. Another example of executing this program is shown in Fig. 3. exit 9 - 17 CELTUI entrance Fig. 1 The example of a maze map LISTE RESTH LESTIEF ELE Fig. 2 The escape path of the specified maze map Page 1 of 3 20:04 * 0.156% Project Final_85b52a0...8563cd86a9dd9b08b - Chi c ng nhp chnh sa v lu thay i cho tp ... + 11. Fuc coape pau VLC OPCUCU HAL tap Page 1 of 3 HOLTIAP IT: Process exited after @.88686 seconds with return value Free any bylo tantissit Fig. 3 The escape path of another specified maze map Note A: The 2-D array shown in Fig. 4 represents the maze map of Fig. 2. Your program should at least find out the escape path based on the maze map shown in Fig. 2. The integer elements of this array doesn't really matter, they are used just to distinguish between the wall and the path. The array maze illustrated in Fig. 4 use "2" to represent the wall and use "0" to denote the path. int maze[SIZE 1][SIZE2] = { {2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2,2,2,0,2) {2.0,2,0,0,0,0,2,0,0,0,0,0,2,0,0,0,0,2.0.0.0.2.0.0.0.2.0.2 (2.0.0.0.2.2,0,2,2,2,2,2,0,2,0,2,2,0,2,0,2,0,2,2,2,0,0,0.2). { 2,0,2,0,2,0,0,0,0,0.2,0,0,0,0,0,0,0,2,0,0,0,2,0,2,0, 2, 2, 2 12.0.2.0.0.2.2.2.2.0.2.0.2.2.0.2.2.0.0.0.2.0.0.0.2.0.0.0.2 22,2,2,0,0,2,0,2,0,0,0,0,0,0,2,0,0,2,2,2,0,2,0,2,0,2,0 { 2,2,0,0,0,2,0,0,2, 2.2, 2, 2, 2.2,2,2,2,2,0,0,0,2,2,2,2,2,0 12.0.0.2.2.2.2.0.0.2.0.2.0.0.0.2.2.0.0.0.2.2.2.0.2.0.2.0 2,2,0,0,0,0,0,2,0,0,0,2,2,2,0,0,0,2,2,0 2,0,0,0,2,0,0,0 { 2,0,0,2,0,2,0, 2, 2.2.0.2.0.0.0.2.0.0.2.0.0.0.2.0.2.0.2.0. {2.2,2,2,0,2,0,2,0,0,0,0,0,2.0.2.2.0.2.0.2.0.2.2.2.0.2.0. (2.0.0.0.0.2,0,0,0,2,0,2,0,0.0.0.0.0.2.0.2,0,0,0,0,0,2,0, {2.0.2, 2.2.2.2.2.2.2.2.2.2.2.2,2,2,2,22,2,2,2,2,2,2,2, 2 NNNNNNNNNNNNN Fig. 4 The maze map for the escape result of Fig. 2 Page 2 of 3

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions

Question

List the advantages and disadvantages of the pay programs. page 505

Answered: 1 week ago