Reference no: EM13936756
Using only C (not c++) design the program described
General Requirements
- Write a program that reads letters from a file called"inputLet.txt".
- Your program will ask the user to enter the number of games they wish to play (1 to 4)
- This program should open an inputLet.txt file , read in one character at a time and repeat this for the number of games the user wants to play.
- the test file will contain at least 15 letters, all lowercase
- When the number of games has been played, the program will end
- A preprocessor directive must be used to define the maximum number of guesses as 5
- If the player has used up all of their guesses, a message that the game is over should be displayed along with the letter they were trying to guess.
- You must have at least 4 user defined functions as follows:
//this function provides instructions to the user on how to play the game
void Instructions( );
//this function runs one game. It for checks either 5 incorrect guesses or correct guess.
//It returns a 0 if the game is over and the player did not guess the letter, otherwise it returns 1.
int PlayGuess(char solution);
//this function prompts the player to make a guess and returns that guess
//this function is called from inside the PlayGuess( ) function described above
char GetLetter( );
//this function takes two arguments, the guess from the player
//and the solution letter from the file.
//It lets the user know if the guess comes alphabetically before or after the answer
//The function returns 1 if the guess matches the solution and returns a 0 if they do not match
int CompareLetters(char guess, char solution);
Additional Requirements:
- Use function prototypes.
- Write comments for each function that will appear in the file before each prototype and again before each function definition.
- Be sure to comment your code adequately.
- Be sure to indent properly.
- Use meaningful variable names
Introduce a few areas of programming using c
: In this project it was required to write a small Notepad program and it will introduce a few areas of programming using C# (which are very important in many programs), including: Windows Forms and the Event Handling model GUI (Graphical User Inter..
|
Research on woolworths supermarket
: Students must research Woolworth's Supermarket. Students are to write an Integrated CRM Strategy Plan in Report Format.
|
Algorithm that returns the smallest value in the array
: Write an algorithm that outputs the smallest and second smallest values in the array.
|
Describe the artwork in terms of subject
: Describe the artwork in terms of subject, medium, composition, and use of color. Classify the work of art, highlighting the style, movement, and any innovation the artist displayed
|
Write a program that reads letters from a file
: This program should open an inputLet.txt file , read in one character at a time and repeat this for the number of games the user wants to play.
|
Describe the biological consequences of the protein
: Discuss why RNA polymerases are not able to correct base errors during replication or transcription. Describe the biological consequences of the protein that may develop in this case.
|
Describe three features of a good balanced scorecard
: Describe three features of a good balanced scorecard. What are three important pitfalls to avoid when implementing a balanced scorecard? How does an engineered cost differ from a discretionary cost?
|
Australian marketing institute code of professional conduct
: Why is it important to abide by the provisions of the Australian marketing institute code of professional conduct?
|
What is the frequency of heterozygotes for the allele
: If heterozygotes for the beta-thalassemia allele are protected against malaria, what is the selection coefficient s1 aganist homozygotes for the normal allele? Again, what assumption must you make in your calculation?
|