Answered step by step
Verified Expert Solution
Question
1 Approved Answer
(language c++) Please solve quickly, thank you Homework - Two Dimensional Arrays a- Write a function that reads a matrix of integers with a varying
(language c++) Please solve quickly, thank you
Homework - Two Dimensional Arrays a- Write a function that reads a matrix of integers with a varying number of rows and 5 columns. b- Write a function that checks if the matrix is row-magic (this means that every row has the same sum). Example: the following matrix is row magic, the sum of each row is 11. 1 4 1 2 1 6 1 1 1 5 3 1 2 3 1 C- Write a function that checks if the matrix is column-magic (this means that every column has the same sum). d- Write a function that checks if the matrix is a Latin square. This means that it must be square (n x n), and that each row and each column must contain the values 1, 2, ..., n with no repeats. Example: The following matrices are 5x5 Latin Squares. 1 2 3 4 5 1 2 3 4 5 2 3 5 1 4. 2 4 1 5 3 3 5 4 2 1 3 5 4 2 1 4 1 2 5 3 4 1 5 3 2 5 4 1 3 2 5 3 2 1 4 e- Write a function that sorts a 2-D array of integers, of varying number of rows and 5 columns. f- In your main function, declare the following arrays: int A[4][5]; int B[6][5]; int C[5][5]; 1 g. In your main function, call the function in (a) to read the values in each of the matrices, then call all of the other functions on the matrices above and display the result of each matrix (whether it is row-magic, col-magi, Latin square). h- Call the sort function on each of the matrices, and display the result (the sorted matrices) neatly and clearlyStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started