Programming In C: Word Jumble Assignment. Please Do NOT post about Similar Codes
ID: 646951 • Letter: P
Question
Programming In C: Word Jumble Assignment. Please Do NOT post about Similar Codes. Only codes following these guidelines.
. Allow the user to select letters one character at a time for proper placement in the word. . At every stage of the game. the user should be able to view the scrambled word and the current state of the partial solution. . If a letter is added and the word is not guessed correctly, the number of remaining guesses is decreased. . Each time the user is asked for a letter, the array containing the partial word is displayed with * replacing any letters that have not yet been guessed. . The jumbled word is also displayed each time the user is asked for a letter. . The user is allowed up to 3 incorrect guesses. . The game is over when the word is guessed correctly or the three incorrect guesses are used up. . If the player guesses the word correctly, the player is notified that they have won and the correct word is displayed. . If the player does not get the correct word and the guesses are all used, the player is notified that they have lost and the correct word is displayed. . When the game is over, the user should be allowed to play again without having to execute the program again. ( The player will play again with the next set of words in the file)Explanation / Answer
#include #include #include #include using namespace std; int main() { int points=0; int gameloop=1; enum fields{WORD,HINT,FIELDNUM}; const int NUMWORDS=5; const string WORDS[NUMWORDS][FIELDNUM]= { {"wall","You can bang your head against this."}, {"glasses","You might be able to read this with these."}, {"tired","Sleepy? Had a hard day at work?"}, {"persistent","Keep at it!"}, {"jumble","It's what this game is all about!"} }; coutRelated Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.