Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write a simple assembly language program to sort an array of numbers into ascending (small to large) order. Additionally, find the minimum, statistical median, maximum,

image text in transcribed

image text in transcribed

Write a simple assembly language program to sort an array of numbers into ascending (small to large) order. Additionally, find the minimum, statistical median, maximum, sum, and average of the list. You should find the minimum and maximum after the list is sorted (i.e., min-array[O] and max-array[len-1]. For an odd number of items, the median value is defined as the middle value. For an even number of values, it is the integer average of the two middle values. The median must be determined after the list is sorted. NOKMAL DISTRBUTION Use the following Comb sort algorithm which sorts in ascending order: void function combSort (array, length) gaplength swapped true outer loop while gap>1 OR swappedtrue // update gap for next comb sweep gap(gap *10) 12 if gap array[1+gap] array [i+gap]) end if i-i1 end inner loop end outer loop end function You must use the above comb sort algorithm above (i.e., do not use a different sort). Note, the algorithm assumes array index's start at 0. As necessary, you can define additional variables. Submissions not based on this algorithm will not be scored The program should display the minimum, maximum, statistical median, sum, and average to the screen in dozenal (base 12) format. Use the provided main, which includes the print routines. You will need to add the int2dozenal macro code from the previous assignment. Example Output: The results, as displayed to the screen, would be as follows: CS 218 -Assignment #7 Minimum: Maximum: Median: Sum: Average: -534X +65X9 +4E5 +19466x +X31 Note, since this program displays output to the screen, it can be executed without the debugger. Write a simple assembly language program to sort an array of numbers into ascending (small to large) order. Additionally, find the minimum, statistical median, maximum, sum, and average of the list. You should find the minimum and maximum after the list is sorted (i.e., min-array[O] and max-array[len-1]. For an odd number of items, the median value is defined as the middle value. For an even number of values, it is the integer average of the two middle values. The median must be determined after the list is sorted. NOKMAL DISTRBUTION Use the following Comb sort algorithm which sorts in ascending order: void function combSort (array, length) gaplength swapped true outer loop while gap>1 OR swappedtrue // update gap for next comb sweep gap(gap *10) 12 if gap array[1+gap] array [i+gap]) end if i-i1 end inner loop end outer loop end function You must use the above comb sort algorithm above (i.e., do not use a different sort). Note, the algorithm assumes array index's start at 0. As necessary, you can define additional variables. Submissions not based on this algorithm will not be scored The program should display the minimum, maximum, statistical median, sum, and average to the screen in dozenal (base 12) format. Use the provided main, which includes the print routines. You will need to add the int2dozenal macro code from the previous assignment. Example Output: The results, as displayed to the screen, would be as follows: CS 218 -Assignment #7 Minimum: Maximum: Median: Sum: Average: -534X +65X9 +4E5 +19466x +X31 Note, since this program displays output to the screen, it can be executed without the debugger

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Relational Database And SQL

Authors: Lucy Scott

3rd Edition

1087899699, 978-1087899695

More Books

Students also viewed these Databases questions