Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

A[0] A[1] A[2] A[3] A[4] Step 1: Of the unsorted elements in array A, find the i

ID: 3621982 • Letter: A

Question

              A[0] A[1] A[2] A[3] A[4]

Step 1: Of the unsorted elements in array A, find the index of the smallest element.In this example, the value 2 is stored in A[4]

Step 2: Swap the element currently in position 0 with the element in position

               42     16     4     23   18

               A[0] A[1] A[2] A[3] A[4]

Step 3: Of the unsorted elements in array A, find the index of the smallest element.In this example, the value 4 is stored in A[2]

Step 4: Swap the element currently in position 1 with the element in position 2

                2    4     16    23    18

             A[0] A[1] A[2] A[3] A[4]

Step 5: Of the unsorted elements in array A, find the index of the smallest element.In this example, the value 16 is stored in A[2]

Step 6: Swap the element currently in position 2 with the element in position 2

              2      4    16    23   18

            A[0] A[1] A[2] A[3] A[4]

Step 7: Of the unsorted elements in array A, find the index of the smallest element.In this example, the value 18 is stored in A[4]

Step 8: Swap the element currently in position 3 with the element in position 4

             2       4     16   18    23

            A[0] A[1] A[2] A[3] A[4]

Step 7: Of the unsorted elements in array A, find the index of the smallest element.In this example, the value 23 is stored in A[4]

Step 8: Swap the element currently in position 4 with the element in position 4

            2      4    16    18   23

          A[0] A[1] A[2] A[3] A[4]

Note that there are two basic operations that are repeated until all the elements are sorted:

- Locating the “smallest” of the unsorted elements

- Swapping the position of smallest unsorted element with that of the first unsorted element

Each of these operations can be implemented as a separate function.

Descending Sort Algorithm – what is required in the programInstead of locating the smallest unsorted element and moving it to the lead position, locate the largestunsorted element and move it to the lead

position using a swap function. The code that finds the “largest”unsorted element is easily implemented as a function.

input files

P12_empty.txt

P12_error1.txt

817A6354

P12_error2.txt

B17A6354

P12_in8.txt

81726354

P12_in15.txt

987151432110654131211

P12_in22.txt

15141312111022212019181716987654321

README.txt

################################################################To receive the full 30 points for the extra credit program, yourprogram must correctly handle the input files:
P12_empty.txtP12_in8.txtP12_in15.txtP12_in22.txt
Output of your program should match that of the sample solutionincluding all messages.#################################################################

#################################################################For the +5 extra points, the program should be able to handlethe input files:
P12_error1.txtP12_error2.txt
With outputs as shown by the sample solution.#################################################################

 

Don't use system............................plz

Explanation / Answer

Dear, Giving standard deviation program by inputting size of array #include #include using namespace std; //Function prototype declaration double standard_Deviation(double x[],int n); //Main function void main() { //variable declaration double x[100]; double mean,sdeviation; int i,n; //Inputting number of values coutn; //Inputting array values cout
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote