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

Write a complete program that: Use the randon number generator to generate 50 nu

ID: 3609033 • Letter: W

Question

Write a complete program that: Use the randon number generator to generate 50 numbers.Store these numbers in an input file. Put the numbers in order using the Insertion Sort. Search for a(any) number using the Sequential Search. Write a complete program that: Use the randon number generator to generate 50 numbers.Store these numbers in an input file. Put the numbers in order using the Insertion Sort. Search for a(any) number using the Sequential Search.

Explanation / Answer

//Hope this will help you.. #include #include #include using namespace std; void insertion_sort( int *array,int len ) {      int i, j, key, array_length=len; ofstream myfile ("output.txt"); if (myfile.is_open()) {      for(j = 1; j = 0) && (array[i] > key);i--)   //Move smaller values up one position           {                 array[i+1] = array[i];           }          array[i+1] =key;    //Insert key into proper position         myfile
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