Question: Hello I need help with this code in c++ please. I appreciate your help. Also if possible I would greatly appreciate it if you could

Hello I need help with this code in c++ please. I appreciate your help. Also if possible I would greatly appreciate it if you could comment and explain just a bit of the logic as it helps me understand what is going on so I can grasp the material. But anyways on the question. I need help creating a program that dynamically allocates an array. that'll display a menu like this

Menu write a function that displays the following menu to the user:

1. Display

2. Sort

3. Shuffle

4. Max

5. Quit

This code has multiple functions the first being a populate function that passes in the user inputted size, and then it will return a dynamically allocated array of that given size and then populate it with random values between 1-100 and then it'll end up returning the array.

The second function is the display function that will pass in a pointer to an array and it's size and then display the contents of the array with 10 of its values per line and having it skip a line after every 10 values

The third function is a swap function that will pass in two ints and then end up swapping their values,

The fourth is a sort function that passes in a pointer to the array and the size and then shuffle the contents of the array by swapping two randomly chosen values and passing them into the swap function listed earlier,

the final is the max function that'll pass in a pointer into the array and a size, and it'll go through the entire array and return the maximum value for the array

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!