Question: Implement a guessing game in MIPS, where the user picks a number between 1 and 100 (this number does not have to be entered into

Implement a guessing game in MIPS, where the user picks a number between 1 and 100 (this number does not have to be entered into the program), and the computer tries to guess your number. After each guess, THE USER should specify whether the secret number is higher or lower than the computers guess. The computers guess should be a random number between the known maximum and minimum values. For example, if your secret number is 55, the computer would begin by guessing a random value from 1 to 100. Depending on the result, its guess may be higher or lower than 55, to which you would input h or l. Lets say the computer guesses 42. You would input h. The new lower bound is 42, and upper bound is still 100. The computers next guess would be between 43 and 100. This continues until the computer guesses your number for this, you will enter x to indicate the game is over. The program should then print a message that includes the number of guesses it took (e.g. Yay! I got it in tries!). You will need to use syscalls for printing a string to the console, reading a character from the console, and generating a random number. These can be found in the syscall

PLEASE DO NOT ASK THE USER TO ENTER THE SECRET NUMBER> THE USER DOES NOT ENTER THE SECRET NUMBER.

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!