countdown
This program makes the longest english word from a selection of letters and checks it in the dictionary. It is written in C and is compatible with both Windows and Linux. The name of the project is from the British TV gameshow
called countdown.
Version 2 saves reults to a file called output.dat in DOS or ./output.dat.tmp in LINUX, and speeds up operation - No more annoying Continue / Stop prompts - a real must have feature.
How it Works
- Instead of randomly generating words the program asks for an input of 9 letters.
- The letters are stored in an array - givenletters.
- The dictionary is opened and is read line-by-line.
- On each line is a new word (max length 9 letters - program may get stuck in a loop if it is longer).
- The program loads the word into an array - text.
- It then searches the given letters for the first character in text - then the second, third and so on.
- If a letter is accepted 1 is added to the score.
- The program uses strlen (string.h) to get the length of text.
- If the score is equal or greater then the user is asked whether they want to stop the search or not!
Download
Includes:-
- Source Code
- Readme File
- Executable
- 5 Word Dictionary
|