Please written by computer source const int ROW_SIZE = 10; const int COLUMN_SIZE = 10; int myMatrix[ROW_SIZE][COLUMN_SIZE]; Note that these constants will be in main and not in the scope of any other function. That is, you must design your functions to have parameters to receive the dimensions. Write a function called initialize that receives a 2D array and initializes the array with random values between 0 and 99. Add a message that confirms the successful creation of the matrix. Call this function in main to initialize myMatrix. Write a function called display that receives a 2D array and displays the elements of the array in a tabular format. Arrange the method to display row and column numbers. Row indices displayed on the left and column indices displayed at the top. Call this function in main to print myMatrix. Write a function called sumEven that receives a 2D array and returns the sum of all the even elements. Call this function in main to calculate and display this value for myMatrix. Write a function called sum2Diagonal that receives a 2D array and sums all the values in the secondary diagonal (Top right to bottom left). Call this function in main to calculate this value for myMatrix. Write a function called sumColumn that receives a 2D array and a column number. The function returns the sum of all the elements in that column. Call this function in main to calculate and display this value for the last column of myMatrix. Write a function called largestSum that receives a 2D array and returns the number of the row with the largest sum of elements. Call this function in main to calculate and display this value for myMatrix.  Write a function called transpose that receives a 2D array and transposes the array. The transposed matrix will be stored in another 2D array. For comparison print both matrices. Call this function in main to transpose myMatrix.

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question

Please written by computer source

const int ROW_SIZE = 10; const int COLUMN_SIZE = 10; int myMatrix[ROW_SIZE][COLUMN_SIZE];

Note that these constants will be in main and not in the scope of any other function. That is, you must design your functions to have parameters to receive the dimensions.

Write a function called initialize that receives a 2D array and initializes the array with random values between 0 and 99. Add a message that confirms the successful creation of the matrix. Call this function in main to initialize myMatrix.

Write a function called display that receives a 2D array and displays the elements of the array in a tabular format. Arrange the method to display row and column numbers. Row indices displayed on the left and column indices displayed at the top. Call this function in main to print myMatrix.

Write a function called sumEven that receives a 2D array and returns the sum of all the even elements. Call this function in main to calculate and display this value for myMatrix.

Write a function called sum2Diagonal that receives a 2D array and sums all the values in the secondary diagonal (Top right to bottom left). Call this function in main to calculate this value for myMatrix.

Write a function called sumColumn that receives a 2D array and a column number. The function returns the sum of all the elements in that column. Call this function in main to calculate and display this value for the last column of myMatrix.

Write a function called largestSum that receives a 2D array and returns the number of the row with the largest sum of elements. Call this function in main to calculate and display this value for myMatrix.

 Write a function called transpose that receives a 2D array and transposes the array. The transposed matrix will be stored in another 2D array. For comparison print both matrices. Call this function in main to transpose myMatrix.

Expert Solution
steps

Step by step

Solved in 3 steps with 7 images

Blurred answer
Knowledge Booster
Array
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education