Question: In C language only! Write a program that will populate a 2d array of integer values, print out * 2d array you just created, and
In C language only!
Write a program that will populate a 2d array of integer values, print out * 2d array you just created, and then calculate some values of the 2d array. * * Your main should read in a min and max value for the values in the array * as well as the number of rows and columns in the array. (10 points) * The code should * make sure that the number of rows or number of columns requested is not * larger than the 15x15 array and looping until values less than 15 are * entered (10 points). You should have code in the main of your program that * calls and display any results from the three functions in an appropriate * manner. (10 points) * * The 2d array and any other information MUST be passed to the functions. * No global variables should be used. * * The first function createGrid will populate the 2d array * with integer values. The function will have arguments for the number of * rows and number of columns in the 2d grid as well as the min and max * for the values in the array. The function will then create the appropriate * integer values for each entry in the 2d array, we do not need separate * min/max for each row, a single min and a single max value will be used * for all the rows. (20 points) * * The next function, printGrid, prints the 2d array of numbers nicely as a * table, making sure columns line up (20 points). * * The third function will described on the board during your assigned * lab time. (20 points) Third function is you should change return type of that function from void to appropriate return type.
void thirdFunction( /* PLACE APPROPRIATE FUNCTION PARAMETERS HERE*/) { // place code for third function here, description will be // posted on the board during your assigned lab period } int main() { int ourGrid[15][15]; // largest grid we will need double result[15]; // for thirdFunction results // place code here for reading in min, max, number rows, number columns, and // code that makes sure the rows and columns are always less than 15 and // also code that calls your three functions return 0; } Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
