Question: For this problem using C programming, you will generate a random number, make a guess until you guess correctly. Each time the statistics will be
For this problem using C programming, you will generate a random number, make a guess until you guess correctly. Each time the statistics will be written to a file. For one set of games you will make a guess until you guess correctly. For the second set you will receive an indication of whether you guess was too high or two low. There will be one file straight.txt with one line with each count, and another file hints.txt with one line with each count. After both sets of games are finished, the program will read straight.txt and print the number of games, total guesses and average with labels. Then it will read hints.txt and print the same information with a label.You will use rand to get a number n. Then the user types in a guess, if the guess is out of range it is ignored, else if is correct a count of guesses is printed to the screen and a file.Each incorrect guess is printed in the correct postion of a line.If the straight version just the guess is printed. If the hints version the printed number is negative if too low and positive if two high.
There will be four constants, you must use these everywhere in your code #define MAX 16 #define GAMES 8 #define STRAIGHT "straight.txt" #define HINTS "hints.txt"
Game 1 should look like this

game 2 should look like this

Straignt 16 Game 1 10 11 12 13 14 15 16 Correct in 16 tries Game 2 10 11 12 13 14 15
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
