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

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 15:10
Which activity should be part of a long-term plan to positively affect yourhealth? oa. wearing regular clothing when handling toxinsob. not worrying about secondhand smokeoc. avoiding excessive exposure to sunlightod. drinking only well water
Answers: 1
question
Computers and Technology, 22.06.2019 22:30
What is the most popular genre of video games?
Answers: 1
question
Computers and Technology, 23.06.2019 17:00
Companies that implement and apply an information system effectively can create
Answers: 1
question
Computers and Technology, 24.06.2019 09:00
Why might you chose to crest a function resume
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
question
Computers and Technology, 20.10.2020 05:01
question
Social Studies, 20.10.2020 05:01
Questions on the website: 13722360