Easy 68k varaince and average

profileazazan
310.p2.f14.doc

Write an assembly language program to compute the mean and the variance of the following data at location DATA:

10, 12, 8, 17, 9, 22, 18, 11,23,7, 30,22,19,6,7

where

mean = 1/n (x1 + x2 + …+xn)

variance = 1/n { (x1-mean)2 + … +(xn –mean)2 }

1. Print your name

2. Print the data with “INPUT IS”

3. Print the mean with “MEAN IS “

4. Print the variance with “VARIANCE IS”.

To upload the output, you may have to get a screendump (use LOG filename, see p. 698).

Log A:OUTPUT

Log

Upload OUTPUT