Question: General Requirements . . . Write a program that reads letters from a file called letters.txt. Your program will open the letters.txt file read in

 General Requirements . . . Write a program that reads lettersfrom a file called "letters.txt". Your program will open the letters.txt file

General Requirements . . . Write a program that reads letters from a file called "letters.txt". Your program will open the letters.txt file read in one character at a time For this assignment the test file will contain at least 30 letters, uppercase OR lowercase In your program you will change each letter (solution) to uppercase Use the function toupper in #include You create a numerical version of the uppercase letter from the file . o Use int numberSolution (int)solution; A sample of an input file that you can use to test your program is included with the assignment. The player will enter a number between (65 and 90- the numerical ASCII values for capital letters A - Z) . . o YOU CAN ASSUME THE USER WILL ENTER A NUMBER BETWEEN 65 and 90 You will let the user know how close their guess is to the solution and print the solution letter onto the screen You will ask the user if they want to try again with a new letter, if yes get another letter from the file, if no, end the program * . You must have at least 4 user defined functions as follows: o No modifications may be made to the functions #define #include #include #include CRT. SECURE NO WARNINGS - - - //this function provides instructions to the user on how to play the game void GameRules ); //this function runs one game. //input: character from the file, void return type //all other functions to Play one round of a game //are called from within the PlayTheGame function void PlayTheGame (char solution); //this function prompts the player to make a guess and returns that guess //this function is called from inside the PlayTheGame() function described above int GetGuess(); //this function takes two arguments, the guess from the player //and the solution letter from the file. //This function lets the user know if how far their guess is from the solution and //also prints the solution onto the screen void CompareGuessAndSolution(int guess, char solution); dditional 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. Check your textbook and lecture code examples to see how it should be done Use meaningful variable names

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!