473,503 Members | 11,435 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How could i write a puzzle program?

2 New Member
Word Puzzle
Task
You are going to search M words in an N × N puzzle. The words may have
been placed in one of the four directions as from (i) left to right (E), (ii) right
to left (W), (iii) up to bottom (S), or (iv) bottom to up (N). The program
will print the starting place and the direction of each word.
Limitations
The number of words to be searched can be at most 100, the size of the
puzzle N can be minimum 5 maximum 20.
Implementation
The puzzle and the words to be search will be declared as constant array. The
names of the contants will be puzzle and words respectively. For example:
char* puzzle[6] = {"ebzrys",
"rsygaf",
"caakce",
"avcmre",
"nolnoc",
"droguz"};
char* words[5] = {"ercan", "olcay", "conlon", "oguz", "cprog"};
Sample Output
Word ercan at 1, 1 direction S
Word olcay at 6, 3 direction N
Word conlon at 5, 6 direction W
Word oguz at 6, 3 direction E
Word cprog can not be found
Important Notice
When the assistants check your program, they will not only change the contents
of the puzzle and words but also sizes of those arrays (N and M). Write
your code considering this.
Apr 3 '07 #1
3 3194
sicarie
4,677 Recognized Expert Moderator Specialist
The experts on this site are more than happy to help you with your problems but they cannot do your assignment/program for you. Attempt the assignment/program yourself first and post questions regarding any difficulties you have or about a particular function of the code that you don't know how to achieve.

Please read the Posting Guidelines and particularly the Coursework Posting Guidlines.

Then when you are ready post a new question in this thread.

MODERATOR
Apr 3 '07 #2
sicarie
4,677 Recognized Expert Moderator Specialist
Do not double post. You have created this thread, and I have deleted the second you created.
Apr 3 '07 #3
oncue01
2 New Member
Ok,thank for ur avoid,i try to do my best.
Apr 3 '07 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

23
1907
by: Edward K. Ream | last post by:
I've just about convinced myself there is no good, clean solution to the following puzzle. I wonder if you agree. 1. My app has a module called leoGlobals that contains often-used global...
1
13074
by: xavier vazquez | last post by:
I have a problem with a program that does not working properly...when the program run is suppose to generate a cross word puzzle , when the outcome show the letter of the words overlap one intop of...
0
2002
by: xavier vazquez | last post by:
have a problem with a program that does not working properly...when the program run is suppose to generate a cross word puzzle , when the outcome show the letter of the words overlap one intop of the...
5
4447
by: ashish0799 | last post by:
HI I M ASHISH I WANT ALGORYTHMUS OF THIS PROBLEM Jigsaw puzzles. You would have solved many in your childhood and many people still like it in their old ages also. Now what you have got to do...
7
2811
tpgames
by: tpgames | last post by:
I've tried to get a PHP cookie to work in php game, no luck. I've tried to get a JS cookie to work. NO luck. I can't even get a response in the php forum, so gave up! I've posted 6 or 7 times and...
6
2559
by: Phoe6 | last post by:
Hi All, I would like to request a code and design review of one of my program. n-puzzle.py http://sarovar.org/snippet/detail.php?type=snippet&id=83 Its a N-puzzle problem solver ( Wikipedia page...
3
1712
by: ayiha | last post by:
Problem statement: You might have come across a puzzle which contains 15 numbered square pieces, which can be moved horizontally or vertically. A possible arrangement of these pieces is shown...
10
2129
by: cjard | last post by:
I have a client and server that enjoy the following simple dialogue: Client connects Client sends request Server sends response Client disconnects This is the way it must be. The response...
4
19760
by: honey777 | last post by:
Problem: 15 Puzzle This is a common puzzle with a 4x4 playing space with 15 tiles, numbered 1 through 15. One "spot" is always left blank. Here is an example of the puzzle: The goal is to...
0
7193
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7067
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7264
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7316
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
6975
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7449
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5562
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
1495
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
728
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.