Question
The purpose of this assignment is to provide you the opportunity to gain hands on experience with assembly language programming. Your task is to develop
The purpose of this assignment is to provide you the opportunity to gain hands on experience with assembly language programming. Your task is to develop a number guessing game in QTSpim using MIPS Assembly coding language. Your program must adhere to the following:
1. Prompt the user to enter an integer number N that will serve maximum (e.g., the number that will be guessed will range from [0 N]
2. Prompt the user to enter a seed S for the randomizer and initialize the randomizer
3. Using the randomizer initialized above, generate a random number R whose range is between [0 N]
4. Prompt the user to guess a number X 5. Determine whether X is equal to R, hot (within 10% of R), or cold (greater than 10% of R)
6. Inform the user on whether their = X was correct (e.g., X = R) hot, or cold
7. If correct end program, If hot or cold, go back to step 3 (prompt the user to enter a number)
Bonus: Instead of hot or cold use Very Hot (X is within 5% of R), Hot (X is within 10% of R), Correct, Cold (X is within 10% to 25% of R), Very Cold (X is greater than 25% of R)
Note: You can assume that N as entered will be a valid positive integer and that N, as entered, will be large enough to ensure you can actually check for very hot, hot, cold, very cold. In other words, you are NOT required to perform and error checking on the user input.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started