By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
464,715 Members | 1,250 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 464,715 IT Pros & Developers. It's quick & easy.

How could i write a puzzle program?

P: 2
Word Puzzle
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.
The number of words to be searched can be at most 100, the size of the
puzzle N can be minimum 5 maximum 20.
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",
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
Share this Question
Share on Google+
3 Replies

Expert Mod 2.5K+
P: 4,677
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.

Apr 3 '07 #2

Expert Mod 2.5K+
P: 4,677
Do not double post. You have created this thread, and I have deleted the second you created.
Apr 3 '07 #3

P: 2
Ok,thank for ur avoid,i try to do my best.
Apr 3 '07 #4

Post your reply

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