The Transpose of a Matrix with a Function
MediumRead the rows and columns of a matrix followed by its elements row by row, and print the matrix under the heading matrix A: and its transpose under the heading transpose:, one row per line with elements separated by single spaces. Compute the transpose in a user-defined function transpose(int m[MAX][MAX], int rows, int cols, int t[MAX][MAX]) that fills the second array with t[j][i] = m[i][j]; read and print with readMatrix and printMatrix from the previous week. Each dimension must be between 1 and 10 (MAX); otherwise print dimensions must be between 1 and 10 and return 1. If any number cannot be read, print invalid input and return 1.
Success Criteria
Your code must pass 6 test case(s) to complete this exercise. 3 hint(s) are available if you need help.
Sign in to track your progress
You can work on exercises as a guest, but sign in to track your progress and save your submissions.
How did you find this exercise?
Your rating helps us improve the content.