subject

Write a MIPS assembly language program that

a) Prompt the user for an integer in the range of 0 to 50. 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 inputted.

c) The program then adds the value of all items 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 integers from 0 to N is:".

For example, if the user gave 5 as the input the program prints out "The sum of integers from 0 to 5 is 15".

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 21.06.2019 20:30
Write a program that reads the file, then displays the average number of steps taken for each month. (the data is from a year that was not a leap year, so february has 28 days.) your program needs to use at least 3 functions not counting main and display the information in a neat well formatted fashion.
Answers: 3
question
Computers and Technology, 21.06.2019 20:50
What are the advantages of google cloud ?
Answers: 2
question
Computers and Technology, 22.06.2019 19:20
1)consider the following code snippet: #ifndef book_h#define book_hconst double max_cost = 1000.0; class book{public: book(); book(double new_cost); void set_cost(double new_cost); double get_cost() const; private: double cost; }; double calculate_terms(book bk); #endifwhich of the following is correct? a)the header file is correct as given.b)the definition of max_cost should be removed since header files should not contain constants.c)the definition of book should be removed since header files should not contain class definitions.d)the body of the calculate_terms function should be added to the header file.
Answers: 1
question
Computers and Technology, 25.06.2019 01:00
When a new name is registered on the internet, the process can take two hours to four hours four hours to three days two hours to two days one hour to eight hours
Answers: 1
You know the right answer?
Write a MIPS assembly language program that

a) Prompt the user for an integer in the ran...
Questions
question
Mathematics, 13.11.2020 21:00
question
Mathematics, 13.11.2020 21:00
question
Mathematics, 13.11.2020 21:00