Question: Written by: Nancy Lamm This program fills a two-dinensional array and then finds the naxinum value Sn each row and column C tt int main()
Written by: Nancy Lamm This program fills a two-dinensional array and then finds the naxinum value Sn each row and column C tt int main() //Print the 2-D array printf("VnArray values n printf //Find naxinum value in each row and print as they are calculated for (rwe; re-3; r++ for (e-e; co-4; c..) if (nunCr nun [in][c]; printf Maxinum for row Ad is n", r max) //Find naximum value in each row and store in a 1-D array for (c-e: cc-4 c..) //Print maximum values from printf WRow Maxinumwn"); for (rwe; r Ji r++) return 0 Classwork Enter the program above. After executing it successfully make the following changes: 1. Instead of initializing the array at declaration, use a nested loop to assign random numbers between 1 to the array 2. Define constants ROM and cou with the number of nows and columns and write linits for all loops as Row-1 or COL-1 3. Find the maximum of each colunn. Store in a one-D array. Print fron the array 4. Find the maximum value of all the elements in the array. 5. Change the size of the array to 6 rows and 6 colums and execute the program again
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
