Your program should the prompt the user to enter a list of integer values, one per line, with the last value being negative. Your pro gram 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 non negative 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.
Enter integer values, one per
line, terminated by a negative
value.
2
1
3
-
1
Sum is: 6
Min is: 1
Max is: 3
Mean is: 2.0000000
Variance is: 0.6666669
Note the variance is: see image.
where n is the number of values, y; is one of the values, and y is the mean. All of the calculated output should be preceded by appropriate text identifying what is being printed.
You should have a comment beside each instruction in the assembly program (or at a minimum a comment for a small group of related instructions) to help make your code more understandable. You should also have comments at the top of the file indicating your name, this course, and the assignment. For example:
#############################################
# #
# Name: Joe Shmoe #
# Class: #
# Assignment: (Determine the sum, min, max, #
# mean, and variance) #
# #
#############################################