Symmetric Matrix (Id-1500)

Bonus Practice Sheet Winter 2018[17-Mar-2018 to 7-Apr-2018]

Program ID- 1500

Given a square matrix check if it is symmetric or not. Represent a matrix as a vector of vectors. Use vector in STL to represent a matrix.

Hint: To create a matrix with ‘r’ rows and ‘c’ columns

vector<vector<int> > m1(r,vector<int>(c,0));

Input Format

Dimension of matrix, ‘n’

Element in row1 col1

Element in row1 col2

Element in row1 coln

Element in row2 col1

Element in row2 col2

Element in row2 coln

Element in rown col1

Element in rown col2

Element in rown coln

Output Format

Print Symmetric or Not symmetric



Please Comment Working if the code worked to you

If you have other working codes please comment the codes enclosing with <pre> and </pre> 🙂

Example: <pre> Your Code </pre>

C++ Code 

Follow for important news/announcements in VIT
The Above Codes are for reference only. It doesn't mean everyone to directly copy/paste those codes.


This site uses cookies and by using the site you are consenting to this.