Category: Arrays 2d
- Write a program to display the sum of principal(left) diagonal in a n x n matrix.
- Write a program to display the sum of trailing(right) diagonal in a n x n matrix.
- Write a program to display the sum of non-diagonal elements in a n x n matrix.
- Write a program to display the sum of border elements in a m x n matrix.
- Write a program to display the sum of non-border elements in a m x n matrix.
- Write a program to display the sum of elements above each diagonal separately in a m x n matrix.
- Write a program to display the product of elements above each diagonal separately in a m x n matrix.
- Write a program to check if an entered matrix is identity matrix. An identity matrix is one which has only 1s in its principal diagonal and 0s everywhere else.
- Write a program to display the prime elements in a m x n matrix in ascending order along with the row and column in which they appear.
- Write a program to store the transpose of a m x n matrix in another matrix and display the new matrix.