Question: 2. Write a MIPS assembly language program that does the followings a) Prompt the user for an integer in the range of 0 to 100.

 2. Write a MIPS assembly language program that does the followings

2. Write a MIPS assembly language program that does the followings a) Prompt the user for an integer in the range of 0 to 100. If the user inputs 0 the program stops b) Otherwise, the program stores the numbers from 0 up to the input value into an array of words in memory, ie. initializes the array with values from 0 up to N where N is the value that user has given. c) The program then adds the value of all odd numbers of the array together (up to N) by loading them from the main memory then add them up, then prints out the sum with the message "The sum of odd integers from 0 to N is." For example, it the user gave 5 as the input the program prints out The sum of odd integers from 0 to 5 is 9

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!