Question: Here is an exchange sort algorithm written in pseudo code: Exchange Sort of Array X[] For I = 0 to (number of array elements -
Here is an exchange sort algorithm written in pseudo code: Exchange Sort of Array X[] For I = 0 to (number of array elements - 2), increment by 1 For J = (I + 1) to (number of array elements - 1), increment by 1 If X[I] is greater than X[J] then temp = X[I] X[I] = X[J] X[J] = temp Next J Next I Write a program to define a simple structure for the following information: last name sales (float) Now declare an array of the structure, reserving space for at least 10 elements. The program should request data from the keyboard to populate (put data in) the array. You may use "quit" as a last name code value to indicate that data input is finished. The array should now be sorted so that the element with the highest sales figure is first and the element with the lowest sales figure is last (adapt the exchange above). Output the sorted array to the screen. To compare the entered last name to "quit" do the following: #include
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
