This function should create an array of size 50 containing randomly generated letters within the range [1, 25]. The program should write the randomly generated array to an output file named by the user. Determine the maximum and minimum values and the indices of their first occurrence and also the number of times each occurs. Write the values, number of occurrences and indices to the output file. Sort the array in increasing order using a “Bubble Sort” and write the sorted array to the output file.

Must contain, minimally, separate functions to:
Initialize the array - fill the array with random letters
Determine the max, the index of its first occurrence and the number of times it occurs
Determine the min, the index of its first occurrence and the number of times it occurs
Perform the bubble sort on the array
Write the contents of the array with 10 numbers per line (5 lines total)

Recommended Answers

All 3 Replies

And?

i think he wants the answer

>i think he wants the answer
I'm sure he wants the answer, but he's not going to get it from anyone remotely qualified.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.