Question: Your assignment is to write a MIPS program that successfully executes on the QtSpim simulator. Your program should prompt the user to enter a list

Your assignment is to write a MIPS program that successfully executes on the QtSpim simulator. Your program should prompt the user to enter a list of integer values, one per line, with the last value being negative. Your program should read in this sequence of nonnegative integer values until the negative value is encountered. Afterwards your program should print the (1) sum, (2) minimum value, (3) maximum value, (4) mean, and (5) variance. You should test your solution using the QtSpim simulator. You can assume that there is between one and 100 nonnegative values in the list, only the last value entered is negative, and this negative value should not be considered when calculating the five items above. Below is an example session, where the values 2, 1, 3, and -1 are entered by the user. As much as possible, you should make your output use a similar format. Enter integer values, one per line, terminated by a negative value. 1 2 3 4 5 6 7 8 9 -1 Sum is: 45 Min is: 1 Max is: 9 Mean is: 5.00000000 Variance is: 6.66666651

Note the variance is:

Your assignment is to write a MIPS program that successfully executes on

Xi= the value of the ith element

the QtSpim simulator. Your program should prompt the user to enter a= the mean of x

N = the number of elements

list of integer values, one per line, with the last value being = variance

All of the calculated output should be preceded by appropriate text identifying what is being printed.

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!