C Program for Matrix operations with pointers
09:17
/* Program for Matrix operations with pointers */
/* Prgram Details :
Operations covered :
1) Create() : for creating and reading m x n elements
in the given matrix
2) print() : diaplays the given matrix
3) Transpose() : Creates transpose of the given square matrix
4) addmat() : adds two matrices and returns the resultant matrix
5) multmat() : multipiles two matrices and returns the resultant matrix
6) saddle() : checks whether the given matrix has a saddle point
7) Magic() : Checks whether the given matrix is a magic square
8) Inverse() : Finds the inverse of the matrix
Out put :>
1)Create First Matrix
2)Create Second Matrix
3)Print 1st Matrix
4)Print 2nd Matrix
5)Transpose of the 1st Matrix:(transpose stored in the same matrix)
6)Add two matrices
7)Multiply two matrices
8)Saddle point in the 1st matrix
9)Inverse of matrix
10)To check whether the first matrix is a magic square
11)Quit
Enter Your Choice : 1
Enter the size of the matrix : 2 2
Enter the data: 2 3 4 5
1)Create First Matrix
2)Create Second Matrix
3)Print 1st Matrix
4)Print 2nd Matrix
5)Transpose of the 1st Matrix:(transpose stored in the same matrix)
6)Add two matrices
7)Multiply two matrices
8)Saddle point in the 1st matrix
9)Inverse of matrix
10)To check whether the first matrix is a magic square
11)Quit
Enter Your Choice : 3
2 3
4 5
1)Create First Matrix
2)Create Second Matrix
3)Print 1st Matrix
4)Print 2nd Matrix
5)Transpose of the 1st Matrix:(transpose stored in the same matrix)
6)Add two matrices
7)Multiply two matrices
8)Saddle point in the 1st matrix
9)Inverse of matrix
10)To check whether the first matrix is a magic square
11)Quit
Enter Your Choice : 2
Enter the size of the matrix :2 2
Enter the data:3 4 5 6
1)Create First Matrix
2)Create Second Matrix
3)Print 1st Matrix
4)Print 2nd Matrix
5)Transpose of the 1st Matrix:(transpose stored in the same matrix)
6)Add two matrices
7)Multiply two matrices
8)Saddle point in the 1st matrix
9)Inverse of matrix
10)To check whether the first matrix is a magic square
11)Quit
Enter Your Choice : 6
Result=
5 7
9 11
1)Create First Matrix
2)Create Second Matrix
3)Print 1st Matrix
4)Print 2nd Matrix
5)Transpose of the 1st Matrix:(transpose stored in the same matrix)
6)Add two matrices
7)Multiply two matrices
8)Saddle point in the 1st matrix
9)Inverse of matrix
10)To check whether the first matrix is a magic square
11)Quit
Enter Your Choice : 11
0 comments: