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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started