Question: Write a program that adds the following to Lab 1 1 : Create a function that will use the BubbleSort to put the numbers in

Write a program that adds the following to Lab 11:
Create a function that will use the BubbleSort to put the numbers in ascending order.
There will be two arguments in the parameter list of this function: an array and the size of the array.
Within the function and the function prototype name the array: intArray.
Within the function and the function prototype name the size of the array: size.
The data type of the function will be void since the array will be sent back through the parameter list.
Output:
Display the array after the numbers have been placed in it. It will be unsorted at this point.
Display the array after it has been sorted. This will display the numbers in ascending order.
NOTE 1: The only input from the User in this program will be the prompt asking if the User wants to run the program again.
NOTE 2: ALL requirements from Lab 11 will apply for this assignment.
NOTE 3:
You must use the code within the previous lecture for generating a random number. Failure to do so will result in a zero with no opportunity to resubmit.
You must use the code within the lecture when filling or printing the arrays. Failure to do so will result in a zero with no opportunity to resubmit.
DO NOT use the "return 0" code, end, break, continue, or exit to force an exit from within your IF/ELSE structure or any LOOPING structure. You will receive a 0 with no opportunity to resubmit if you do.
Let the program progress to the end of the main function.
The end of the main function is the only place that the return 0 should be placed.
A switch statement is the only place that the break command should be placed.
The end, continue, and exit are forbidden.
You must place the function prototypes before the main header. Failure to do so will receive a 0 with no opportunity to resubmit.
You must place the functions after the ending curly bracket of main. Failure to do so will receive a 0 with no opportunity to resubmit.
Do not use the std functions, the printf function, the scanf function, the cout functions, or the cin functions. Only use cout for output and cin for input. Failure to do so will result in a zero with no opportunity to resubmit.
Declare all variables within the data declaration section. (-5) points
Do not get input on the same line as a variable declaration. (-5) points
Do not place an equation for computation on the same line as declaring a variable. (-5) point
Do not place an equation for computation on the same line as an input statement. (-5) points
Do not place a function call on the same line as a variable declaration. (-5) points

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!