Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

PLEASE HELP ME!!!!!! I've done steps 1-7 but this is the rest of what I have left and am so confused.I copied and pasted my

PLEASE HELP ME!!!!!!

I've done steps 1-7 but this is the rest of what I have left and am so confused.I copied and pasted my program so far at the bottom.

8. Copy the function prototypes from the assignment into your source code file where the outline instructs you to do so. (I copied and pasted these in the function prototype in my program that I have at the bottom) Copy the prototypes from the top of your source code and paste them below the main function, EXCEPT THE SingleGame prototype. You should have the outline for SingleGame and a second prototype for the other 3 functions below the main function. Remove the semicolons from the end of the prototypes below the main function, add { } Add return statements inside the definitions where needed (if it returns something) 9. Build, run and test 10. Write the function definition and function call for the GameRules function - build, run, test 11. Write the function call to SingleGame. Use printf statements in both the main function and inside the SingleGame function to test - Build, run and test 12. Add the code to the loop in the SingleGame function above numGuesses = numGuesses +1; This function will return to an integer variable the you will need to add to the main function use printf statements in the main function to test the value of that variable - build, run and test 13. Define and call the RetrieveGuess function from inside the while loop of the SingleGame function - build, run and test 14. Call the GuessedIt function, passing it both the answer from the file and the input_letter from the user guess It will return to an integer you will need to declare in theSingleGame function Use printf statements in both SingleGame and GuessedIt functions to test 15. Add the conditions in the GuessedIt function. Build, run and test 16. Add any in your printf statments to make everything display on its own line 17. Make sure you program runs correctly when you guess correctly and that it allows only the specified number of guesses if you keep guessing wrongly. 18. Make sure you display the answer if the user never guesses it before the number of guesses is depleted. 19. Before submitting you should delete any printf statements you used just for testing. Make sure you have adequate comments and indentation.

This is what I have so far. I'm not sure what I put for function prototypes but those are the four functions I need to use for my program. Please help meeee!!!

#define _CRT_SECURE_NO_WARNINGS #include #define MAXGUESSES 5

//function prototypes 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 GameRules( ); //this function runs one entire game. It for checks either 5 incorrect guesses or a correct guess. //It returns a 0 if the game is over and the player did not guess the letter, otherwise it returns 1. int SingleGame(char file_letter); //this function prompts the player to make a guess and returns that guess //this function is called from inside the SingleGame( ) function described above char RetrieveGuess( ); //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 //this function is called from inside the OneGame( ) function described above int GuessedIt(char answer, char input_letter);

int main() { //declare additional variables int PlayGames = 4, i = 0; //display instructions. GameRules(); //open file char letter; FILE * filePtr; filePtr = fopen("lettersin.txt", "r"); //get number of games to play for (i = 0; i

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

Step: 3

blur-text-image

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

Oracle 10g SQL

Authors: Joan Casteel, Lannes Morris Murphy

1st Edition

141883629X, 9781418836290

More Books

Students also viewed these Databases questions

Question

8. Use headings and subheadings for longer procedures.

Answered: 1 week ago