Question: 48. In main do the following: Declare a 2-dimensional integer array that has 10 rows and 7 columns + Seed the random number generator with

 48. In main do the following: Declare a 2-dimensional integer array

48. In main do the following: Declare a 2-dimensional integer array that has 10 rows and 7 columns + Seed the random number generator with time Fill the 2D array with random numbers from the interval [-40, 80] Prompt the user to enter an integer between -40 and 80 (-40 and 80 included) After the user has entered the integer, use a while input validation loop to prompt the user to re-enter the integer if the integer is less than-40 or greater than 80 Call function print2DArray that prints the 2D array to the screen Call function less ThanNumAndOdd that will return the number of elements in the 2D array that are less than the integer the user entered and the number of elements in the 2D array that are odd. Print the number of elements in the 2D array that are less than the integer the user . . . . . entered Print the number of elements in the 2D array that are odd Test by entering: 120 42 45 (You may do this problem entirely in main with a substantial deduction of points) Function print2DArray: This function receives a 2D integer array the number of rows and the number columns. This function has no return value. The function will print the 2D array to the screen Function less Than NumAndOdd: This function receives a 2D integer array, the number of rows, the number columns, an integer (num) and two pointers to integers. The function will return the number of elements in the 2D array that are less than num using the first pointer and the number of elements in the 2D array that are odd using the second pointer

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!