Question: Write a program in MIPS assembly language using the MARS Simulator that does the following: 1 . Display a prompt to the user: Enter an

Write a program in MIPS assembly language using the MARS Simulator that does the following: 1. Display a prompt to the user: Enter an integer: 2. Wait for the user to enter an integer. 3. If the number entered is zero A. Print The sum is: followed by the sum of all of the integers entered. B. On a new line print The number of integers entered was: followed by the number. This number should not include the final zero. C. Exit the program 4. Add the number to a running sum. 5. Increment the count of integers. 6. Loop back to step 1.7. Do not do magic number For example, if the user enters 4, then 6, then 0, the program would print the following 2 lines: The sum is 10 The number of integers entered was 2

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 Programming Questions!