Write a program to accept the elements in 2d array and perform all the matrix operations i.E. Addition, multiplication, transpose etc.
Answers
Explanation:
Array - Two Dimension
[Set – 1]
1. Write a menu driven C++ program to do following operation on two dimensional array A of size m x n. You should use user-defined functions which accept 2-D array A, and its size m and n as arguments. The options are:
To input elements into matrix of size m x n
To display elements of matrix of size m x n
Sum of all elements of matrix of size m x n
To display row-wise sum of matrix of size m x n
To display column-wise sum of matrix of size m x n
To create transpose of matrix B of size n x m
2. Write user defined functions for square matrix to calculate
Left diagonal sum
Right diagonal sum
3. Write a user-defined function in C++ to display the multiplication of row element of two-dimensional array A[4][6] containing integer.
4. Write a user defined function named Upper-half() which takes a two dimensional array A, with size N rows and N columns as argument and prints the upper half of the array.