Question: Create a C program that performs the following tasks: Declare two (2) arrays to store 24 and 25 integers, respectively Generate 24 or 25 random

Create a C program that performs the following tasks:

Declare two (2) arrays to store 24 and 25 integers, respectively

Generate 24 or 25 random numbers using the rand function and store the numbers in the appropriate array Note: Use a constant seed value to ensure the same results occur every time.

The range of the random numbers should be between 0 and 999 (inclusively)

Both arrays will contain the exact same numbers (one less in the 24-value array)

Calculate the median value of the numbers stored in each arrayThe array must be sorted before attempting to calculate the median value

Sort the 24-value array using the Bubble Sort algorithm

Sort the 25-value array using the Selection Sort algorithm

Determine the middle value of the array

For an array with an odd number of values, locate the middle value in the array

For an array with an even number of values, take the average of the two values in the middle of the array

Display the median value for each array, as well as the numbers stored in both arrays (see Example Outputsection)

Display the median value to two (2) decimal places

Display the numbers stored in the array using 10 columns

Additional Notes

Display programmers name and homework number and at top of program output

Ensure your source code conforms to the programming and commenting standards for the class

Submit the project source code as a single *.c file

Submit a text capture of the compiler output as a *.txt file

Submit a text capture of the program output as a *.txt file

Example Output

// This example is based on a random number generator seed of 10 Ima C Programmer Homework 7 Array Size: 24 -------------- Median Value: 622.00 12 59 71 83 272 296 304 374 462 516 541 550 694 697 722 726 860 899 899 904 923 929 963 981 Array Size: 25 -------------- Median Value: 647.00 12 59 71 83 272 296 304 374 462 516 541 550 647 694 697 722 726 860 899 899 904 923 929 963 981 

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!