0

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)

3
Contributors
3
Replies
4
Views
9 Years
Discussion Span
Last Post by Narue
0

>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.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.