الفريق العربي للبرمجةأرشيف المنتديات · 2000 – 2023
نسخة أرشيفية للقراءة فقط — التسجيل والمشاركة مغلقان، والمحتوى محفوظ كما كان.

قصة مب سؤال... أرجو المساعدة

مغلق
بدأه همس الوجدان في 25 ديسمبر 2003 · 1 رد · 514 مشاهدة · في الأسئلة المجابة
مشاركة: واتساب X فيسبوك تيليجرام
#1 صاحب الموضوع

بسم الله الرحمن الرحيم

السلام عليكم ورحمة الله وبركاته

عندي سؤال ما فهمت شو المطلوب منه :(

ياريت اللي عندهم خبرة ويعرفون يحلون السؤال يساعدوني

اقتباس
)Maze Traversal) The grid of hashes (#) and dots (.) in the figure is a double-subscripted array representation of a maze. In the double-subscripted array, the hashes (#) represent the walls of the maze and the dots represent squares in the possible paths through the maze. Moves can be made only to a location in the array that contains a dot.

There is a simple algorithm for walking through a maze that guarantees finding the exit ( assuming that there is an exit). If there is not an exit, you will arrive at the starting location again. Place your right hand on the wall to your right and begin walking forward. Never remove your hand from the wall. If the maze turns to the right, you follow the wall to the right. As long as you do not remove you’re your hand from the wall, eventually you will arrive at the exit of the maze. There may be a shorter path than the one you have taken, but you are guaranteed to get out of the maze if you follow the algorithm.

Write recursive function mazeTraverse to walk through the maze. The function should receive as argument a 12-by-12  character array representing the maze and the starting  location of the maze. As mazeTraverse attempts to locate the exit from the maze, it should place the character x in each square in the path. The function should display the maze after each move so the user can watch as the maze is solved.

السؤال مع الصورة مرفقين مع الموضوع

Doc1.doc

#2

للرفع

أحتاج لمساعدة عاجلة لحل هذا البرنامج

:(

هذا الموضوع مغلق.

مواضيع مشابهة