Computers and Technology, 28.12.2019 01:31 LucindaKamala
Using the rand () function, fill 5 arrays of integers with the same 10 random numbers. these numbers should be values between 1-100. the arrays should hold 10 integers and named; bubblearray, selectionarray, insertionarray, quickarray, and mergearray.
2. you should use the: a. bubble sort function to sort the bubblearray b. selection sort function to sort the selectionarray c. insertion sort function to sort the insertionarray d. quick sort function to sort the quickarray e. merge sort to sort the mergearray each unsorted array should be outputted to a file name assignment2results followed by the sorted version of the array and the time taken to sort the array to the same file.
using c++
how do i edit below to fit the requirements mentioned atop?
current code:
#include
#include
#include
#include
using namespace std;
int main()
{
int i, j, n=10, temp;
int bubblearray [n];
int selectionarray [n];
int insertionarray [n];
int quickarray [n];
int mergearray [n];
srand (time(null));
for (i = 0; i < 10; i++)
{
int value = rand() % 100 + 1; // random from 1 through 100
bubblearray [i] = value;
selectionarray [i] = value;
insertionarray [i] = value;
quickarray [i] = value;
mergearray [i] = value;
cout < < "this is the randomly generated list for bubblearray: ";
cout < < bubblearray[i] < < " ";
}
cout < < "\n";
cout < < "\nthis is the list after being sorted by the bubble sort method: ";
i = 0, j = 0;
system("pause");
return 0;
}
Answers: 2
Computers and Technology, 22.06.2019 21:00
Simon says is a memory game where "simon" outputs a sequence of 10 characters (r, g, b, y) and the user must repeat the sequence. create a for loop that compares the two strings starting from index 0. for each match, add one point to userscore. upon a mismatch, exit the loop using a break statement. assume simonpattern and userpattern are always the same length. ex: the following patterns yield a userscore of 4: simonpattern: rrgbryybgy userpattern: rrgbbrybgy
Answers: 2
Computers and Technology, 23.06.2019 10:00
Now, open this passage to read about fafsa requirements. describe the information you will need to provide in order to complete a fafsa. list at least three of the required documents you must include.
Answers: 3
Computers and Technology, 24.06.2019 06:30
Me and category do i put them in because this is science
Answers: 1
Using the rand () function, fill 5 arrays of integers with the same 10 random numbers. these numbers...
Business, 15.07.2019 08:00
Mathematics, 15.07.2019 08:00
Computers and Technology, 15.07.2019 08:00
Mathematics, 15.07.2019 08:00
History, 15.07.2019 08:00
Biology, 15.07.2019 08:00
Mathematics, 15.07.2019 08:00
Mathematics, 15.07.2019 08:00
Mathematics, 15.07.2019 08:00
Mathematics, 15.07.2019 08:00