Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

I need C code for this: Random Numbers and Loops Description: For this assignmen

ID: 3665718 • Letter: I

Question

I need C code for this:

Random Numbers and Loops Description: For this assignment, you will write a simple guessing game. The computer will randomly pick a number between 1 and 200 (inclusive), and the user will try to guess it within eight tries. Preparation: Your program will use a random number generator (RNG) to pick the number between 1 and 200. Also, use the man page for further information. Specifications:! Your program will begin with a greeting message, and then ask the user to enter a random number seed. The program will use this number as a parameter to the call. The program will generate a random integer within the proper range. The program will then enter a loop. Within the loop, the program will prompt the user to enter a guess for the chosen number, The program will keep track of the number of guesses made and report to the user the number of guesses they have made so far. o If the guess is too low or high, the program will state so. If the guess is correct, the computer will state this fact, and exit the loop and the program o If the number of user guesses is equal to eight or more, the program will print a message stating that the user has lost. The program will then exit the loop, and then the program. Additional Specifications: The program will contain defme statements to give the upper and lower range for the possible values. The program will contain a defame statement to give the upper limit of the number of allowed guesses. You do not need to check the input of the user. For instance, if the user enters a value outside of the range of possible numbers, your program will properly check the value and treat it as a normal guess reporting if it is too low or high. Testing your completed program: After compiling, run your program several times using the same random numbered, to ensure that its behavior is consistent. Check to see that it exits if too many guesses are made, as well as stating the user found the correct value within the required number of guesses. Then try using different seeds to ensure it is working properly

Explanation / Answer

The best way to generate random numbers in C is to use a third-party library like OpenSSL. For example,

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote