Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

(PLEASE HELP) Write a program in MIPS assembly : Guessing game where the correct value is 6 and the user has 4 guess trials guessing

(PLEASE HELP) Write a program in MIPS assembly:

Guessing game where the correct value is 6 and the user has 4 guess trials guessing from integers 1 to n where n=10. If the user guesses the value '6' (which is the correct value) then the program will print 0, if the user guesses a value less than the correct then the program will output -1, and if higher then the program will output 1.

image text in transcribed

-1: The number I picked is lower than your guess (i.e. pick num). 0: The number I picked is equal to your guess (i.e. pick num). . == Input: n = 10, pick = 6 Output: Guess 1: 5, result 1: 1 Guess 2: 8, result 2:-1 Guess 3: 7, result 3: -1 Guess 4: 6, result 4: 0 Final result: 6

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions

Question

Developing and delivering learning that is integrated with the job.

Answered: 1 week ago

Question

Use of assessments to determine trainees learning styles.

Answered: 1 week ago