Question: Please help me complete this assignment in Programming language C, thank you! Write a program and functions that will do the following: Include these files:

Please help me complete this assignment in Programming language C, thank you!

Please help me complete this assignment in Programming language C, thank you!

Write a program and functions that will do the following: Include these files: stdio.h, stdlib.h, and time.h Main function a. Declare a 3 times 5 array of double values (3 rows with 5 number per row). b. Include the statement: srand((unsigned int) time(0)); before calling dRand(). The call to srand() will initialize the random number generator, srand() is defined in stdlib.h and time() is defined in time.h. c. Use for loops to initialize the 3 times 5 array by calling dRand() which is a function that you write. d. Compute the average for each row of 5 values by calling a dAvg() function that you create. This function should return the average as a double value and should accept a 1-dimensional array of values to be average. Your main function should call it 3 times-once for each row. e. Calculate the average of all 15 values. f. Determine the largest value of the 15 values by calling a dMax() function that you write. dMax() should accepted a 2-dimensional array and return the maximum value as a double value. g. Print out the results in the following format: i. 3 rows of initial values with the average value for the row shown at the right end of the row. ii. The average value of all 15 values-appropriately label the results. iii. The maximum value of the 15 values-appropriately label the results. double dRand(void) a. Returns the result of this calculation: rand()*10.0/RAND_Max b. rand () is defined in stdlib.h and returns an integer value in the range of 0 to RAND_MAX. dAvg() a. Returns a double value containing the average value for an array of doubles that is passed to it. dMax() a. Returns a double value containing the maximum value in the 2 dimensional array that is passed to it

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!