C++ Program to Check if a Matrix is Symmetric or Skew-Symmetric

This is a C++ Program to Find if a Matrix is Symmetric or Skew-Symmetric. Problem Description The program takes an array and checks whether it is a symmetric or skew-symmetric matrix. If a square matrix is equal to its transpose, it is a symmetric matrix. If transpose of a matrix is equal to negative of … Read more

advertisement

C++ Program to Display Upper Triangular Matrix

This C++ program displays the upper triangular matrix for a given n x n square matrix. The program uses a function which has three parameters – the two-dimensional array, the horizontal and the vertical dimension. The function runs a loop over the whole vertical dimension and on each iteration of the outer loop, the inner … Read more

advertisement

C++ Program to Find Dot Product of Two Matrices

This is a C++ Program to Calculate Dot Product of Two Matrices. Problem Description The program takes two matrices and calculates the dot product. Problem Solution 1. The program takes the size of the two matrices. 2. If they are not equal, dot product cannot be found and the program is exited. 3. Else the … Read more

advertisement

C++ Program to Swap Rows of a Matrix

This C++ program interchanges the rows of a matrix. The program takes the the matrix from the input and interchanges the row numbers given from input. The changed matrix is finally printed. Here is the source code of the C++ program which interchanges the rows of a matrix. The C++ program is successfully compiled and … Read more

advertisement

C++ Program to Interchange Diagonals of a Square Matrix

This C++ program interchanges the diagonals of a square matrix. The square matrix is taken as an input and saved into a two-dimensional array which is initialized using new operator. The diagonals of the square are interchanged by changing the elements of the diagonal lying on same row at each iteration. Here is the source … Read more

advertisement

C++ Program to Interchange Diagonals of Matrix

This is a C++ Program to Accept a Matrix and Interchange the Diagonals. Problem Description The program takes a square matrix and interchanges the diagonals. Problem Solution 1. The program takes a square matrix. 2. Using a for loop, the right and left diagonals are interchanged. 3. The result is printed. 4. Exit. C++ Program/Source … Read more

advertisement

C++ Program to Find Transpose of a 3 x 3 Matrix

This C++ Program which generates the transpose of a given matrix of order 3 x 3. The program initializes the matrices according to the input, creates second matrix, transposes the elements of the matrix and puts it in second matrix. Here is source code of the C++ program which generates the transpose of a given … Read more

advertisement

C++ Program to Find Transpose of a Matrix

This is a C++ Program to Find the Transpose of a Matrix. Method 1: Problem Description The program takes a matrix and prints the transpose of the matrix. In a transpose matrix, rows become columns and vice versa. Problem Solution 1. Initially, the number of rows and columns of the matrix are entered, followed by … Read more

advertisement

C++ Program to Check if a Matrix is a Triangular Matrix

This is a C++ Program to Find if an Array is a Triangular Matrix. Problem Description The program takes a matrix and checks if it is a triangular matrix. A triangular matrix is a square matrix which has all elements above or below the main diagonal as 0. Problem Solution 1. The program takes the … Read more

advertisement

C++ Program to Check if a Matrix is a Square Matrix

This is a C++ Program to Find if an Array is a Square Matrix and Print the Diagonals. Problem Description The program takes an array and checks if it is a square matrix and prints the diagonals. A square matrix is one which has equal number of row and columns. Problem Solution 1. The program … Read more

advertisement
Subscribe to our Newsletters (Subject-wise). Participate in the Sanfoundry Certification contest to get free Certificate of Merit. Join our social networks below and stay updated with latest contests, videos, internships and jobs!

Youtube | Telegram | LinkedIn | Instagram | Facebook | Twitter | Pinterest
Manish Bhojasia - Founder & CTO at Sanfoundry
Manish Bhojasia, a technology veteran with 20+ years @ Cisco & Wipro, is Founder and CTO at Sanfoundry. He lives in Bangalore, and focuses on development of Linux Kernel, SAN Technologies, Advanced C, Data Structures & Alogrithms. Stay connected with him at LinkedIn.

Subscribe to his free Masterclasses at Youtube & discussions at Telegram SanfoundryClasses.