This program will prompt the user for 12 int values that are less than 100. As t
ID: 3630526 • Letter: T
Question
This program will prompt the user for 12 int values that are less than 100. As these integers are read in, they are sorted into an array using the algorithm described below. Once the array is completely sorted, it will be printed out and the program will run again. The only way to successfully terminate this program is to manually shut it down.
As each number is read in, it is inserted into an array in its correct position. To do this, first transverse the array, comparing the numbers in it with the number that was read in. After finding the input's number correct position in the array, insert it by shifting all array elements at that location or after the location "up" by one position. Then place the input number at the "empty" position. After each number is inserted, the array will be sorted. Write a program that will perform this insertion sort on its input, given the steps described above.
THANKS WILL RATE LIFESAVER
Explanation / Answer
#include #include int array[12]; int temp,count; void main() { for(int j=0;jRelated Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.