USING C++ Populate an array of size 100 with integers>0 and1000. Initialize the
ID: 3769894 • Letter: U
Question
USING C++
Populate an array of size 100 with integers>0 and1000. Initialize the array using a random number generator with "time" as the seed value., call it RandomNums. Further, 1. Print the elements of the array RandomNums after initializatiorn. 2. Perform selection sort using function on array RandomNums, and sort the array in non-increasing 3. 4. 5. order. Print the elements of RandomNums after sorting from within the above defined function. Create another array of size 50, call it TerminalSum Initialize each element of TerminalSum by adding each pair of terminal elements from RandomNums For Example: Termina!Sum 1st element-RandomNums 1st element + RandomNums 100% element TerminalSum 2nd element RandomNums 2nd element RandomNums 99th element Termina!Sum 50th element = RandomNums 50th element + RandomNums 51st element Print TerminalSum array after initialization. Perform selection sort on TerminalSum, and sort the array in non-decreasing order using another function 6. 7. Print the elements of the array TerminalSum after sorting from within the above defined functionExplanation / Answer
Sample code:
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.