subject

1. create an array of ints with 20 elements. with a random number generator, seeded with time, assign a random number between 1 and 100 to each element of the array. using the selection sort algorithm discussed in class, sort the array from smallest to largest. the sorting of the array should be done inside a user defined function. this function should not return any values to main using a return statement. it should have the following parameters: the array, and the number of elements in the array. only the sorting should be done in the function. everything else (including the random number generation, the printing of pre-sorted array, and the printing of the post-sorted array) should be executed in main. print to the screen the array in a single line before it is sorted. print to the screen the array in a single line after it is sorted. sample output on a similar problem with a 5 element array is: original array 36 47 54 82 15 sorted array 15 36 47 54 82

ansver
Answers: 1

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 08:40, baue4431
What are the three parts to physical security standards for various types of army equipment and the risk level
Answers: 2
image
Computers and Technology, 23.06.2019 02:00, rah45
Which of the following is not a source of sustainable raw materials? a) coal mine b) flick of sheep c) cotton plantation d) line forest.
Answers: 2
image
Computers and Technology, 23.06.2019 04:00, china236
In a word processing program, such as microsoft word, which feature to you choose the desired picture enhancement?
Answers: 2
image
Computers and Technology, 23.06.2019 21:00, shawnnoteman1234
Which task uses a simple parameter?
Answers: 1
You know the right answer?
1. create an array of ints with 20 elements. with a random number generator, seeded with time, assig...

Questions in other subjects:

Konu
Mathematics, 29.04.2021 20:30
Konu
English, 29.04.2021 20:30
Konu
Mathematics, 29.04.2021 20:30