Assembly language programming, write a shell sort that finds the sum and computes the average, get/save min and max, then finds the median.
Here is a provided algorithm that we must use
h = 1;
while ( (h*3+1) < length ) {
h = 3 * h + 1;
}
while ( h>0 ) {
for (i = h-1; i < length; i++) {
tmp = lst[i];
j = i;
for ( j=i; (j >= h) && (lst[j-h] >
tmp); j = j-h) {
lst[j] = lst[j-h];
}
lst[j] = tmp;
}
h = h / 3;
}
Below is the data provided.
Essentially I want to calculate this information and provide what I stated above. Do not worry about the printing part. the min, med, max, sum, avg are all at 0.
I have
hdrMin
hdrMed
hdrMax
hdrSum
hdrAve
tempString
for provided strings.