Question: 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
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, i.e. 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, if 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
Get step-by-step solutions from verified subject matter experts
