15.12.2011, 13:35. Просмотров 398. Ответов 0
Помогите с заданием.
“Crossword puzzle” bonus task
Write a program that will generate crossword puzzle. Sample of the crosswords that your program has generated:
Your program has to work in the following way:
1. Read list of words from the dictionary(txt file) [program that forms dictionary is also will be judged separately]
1.1. Dictionary have to contain words in lower case
1.2. Words in the dictionary can be nouns, verbs or adjectives (nouns have to be in singular form, verbs have to be in infinitive form).
1.3. No articles like ‘a’, ’an’,’ the’ etc. have to be presented in dictionary
2. Read N (1<=N<=50) from the console, this N describes total amount of words from the dictionary that have to be used in generated crossword.
2.1. It’s also possible to read N and WORD; in this case inputted WORD must be presented in crossword one time.
3. Each time when you run your program it has to generate absolutely new crossword, even you enter same N (use randomization).
4. You can generate British-style or Swedish-style crossword (choose only one crossword style).
You can read about crosswords here http://en.wikipedia.org/wiki/Crossword