Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

i need help with this in programming c You will write a program that will play a letter guessing game. General Requirements that reads letters

i need help with this in programming c
image text in transcribed
image text in transcribed
You will write a program that will play a letter guessing game. General Requirements that reads letters from a file called-letters.tst Write a program .Your program will ask the user to enter the number of games they wish to play (1 to 8) . Your program will open the letters.txt file read in one character at a time and repeat this for the user wants to play .For this assignment the test file will contain at least 8 letters, uppercase OR lowercase In your program you will change each letter (solution and guess) to uppercase- o Use the function toupper in #include .When the number of games has been played, the program will end .A sample of an input file that you can use to test your program is included with the assignm . A preprocessor directive must be used to define the maximum number of guesses as5 * If the player has used up all of their guesses, a message that the game is over should be dis letter they were trying to guess. . You must have at least 5 user defined functions as follows o No modifications may be made to the functions #defineCRTSECURENO WARNINGS #include #include #define MAXGUESSES 5 - - - //this function provides instructions to the user on how to play the gane void LetterGuessRules): //this function asks, gets, and /returns the number of ganes the user wants to play int GameCount); //this function runs one gane /input: character from the file, void return type /all other functions to Play one round of a game //are called from within the PlayoneGame function void PlayoneGame(char solution) //this function prompts the player to make a guess and returns that guess //this function is called from inside the PlayOneGame function described above char GetGuess); //this function takes two arguments, the guess from the player /and the solution letter from the file //The function returns 1 if the guess matches the solution and returns a e if they d /This function also lets the user know if the guess cones alphabetically before or int CompareGuessAndSolution(char guess, char solution): . Use function prototypes Write comments for each function that will appear in the file before each prot before each function definition. Be sure to comment your code adequately Be sure to indent properly. Check your textbook and lecture code examples to see h

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions

Question

f. Did they change their names? For what reasons?

Answered: 1 week ago