Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Ask the user to insert how many array elements that they desired, maximum 2 0 . 2 . Create three arrays ( array 1 ,
Ask the user to insert how many array elements that they desired, maximum
Create three arrays array array array with each of them have the total number of elements that inserted by user.
Generate a random number for each element in the first two arrays array & array within the range of to
Hints: You could explore srand and rand to generate the random number.
For the first two arrays array & array compare element by element. If the element value of array is larger than array then store in the array element accordingly. If the element value of array is smaller than array then store in the array element accordingly. If the element of array and array are equal, then store in the array
From array which only stores or based on the comparison result of each element stores in the array and array determine:
The total number of elements that array is larger than array
The total number of elements that array is larger than array
The total number of elements that array is equal with array
Perform the following computations:
Identify the highest value max of array
Identify the lowest value min of array
Calculate the average value mean of array
Sort the array in ascending order and determine the median value.
Hints: You need to explore several sorting algorithms from Internet, eg Bubble sorting, insertion sorting, selection sorting, etc.
Snapshot in the next page shows the program execution output example for your reference, you are free to design your own more interactive user interface or additional function, such as:
Let the user decide if the array sorting prefer in ascending order or descending order.
Make the program more user friendly by asking the user if they want to repeat the whole process before exit the program.
For assignment submission, you need to submitupload files to the elearning:
pdf: Flowchart of your program solutions.
c: Source code of your program or OneCompiler link.
pngjpg: Snapshot of your execution output only applicable to Codeblock
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started