Question: 1. MIPS Assembly Vector Compression: Your program should prompt the user to enter the size of the input vector. You should then prompt the user

1. MIPS Assembly

Vector Compression: Your program should prompt the user to enter the size of the input vector. You should then prompt the user to enter that many integers, one per line. Your program should then print two vectors: one that contains all the non-zero elements in the input vector, and a second that contains the indices of these non-zero elements in the input vector. We will only test your program with valid inputs, so don't bother having checks for invalid inputs. Here's an example run of this program: Enter the size of the vector: 8 Enter the vector elements, one integer per line: 1 0 0 9 0 0 4 0 The non-zero vector is: 1 9 4 The non-zero indices are: 0 3 6

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!