Program 2
Beginning Statistical System
Due: Mon, March 2
Write an assembler language program with the following 3 sections of code:
- Read in up to 100 integer values into an array. The last value read
in will be -99. Do not include -99 in your array. Of course, you
will need to count how many values you read in (be sure you don't include the
-99 in the count).
- Sort the items in the array.
- Find the median (the middle of a sorted list).
If the number of values is odd, then the middle is well defined. If
the number of values is even, then you will need to compute the average of
two middle values (the result will be an integer, since we do not know how
to work with floats yet).
- Print out the median.
Do each of these as three separate steps.
The read section should just do the reading (and counting). The sort
section should do sorting and the median section should just compute the median.