Jump to content

User:Zeeshanaayan: Difference between revisions

From Wikipedia, the free encyclopedia
Content deleted Content added
How to calculate 2x2 Matrix in Cplusplus.
 
No edit summary
 
Line 20: Line 20:
return 0;
return 0;
}
}
For More Information Visit [http://www.ccolumns.com/2013/01/how-to-calculate-2x2-matrix-in-cplusplus.html How to calculate 2x2 Matrix in Cplusplus.]
For More Information Visit [https://www.fiverr.com/zeeshanaayan07/install-wordpress-forum-based-on-bbpress-plugin--2 install wordpress forum based on bbpress plugin]

Latest revision as of 15:38, 19 January 2015

In this program we discuss 2x2 Matrix in Cplusplus. In the matrix multiplication AB, the number of columns in matrix A must be equal to the number of rows in matrix B. The resulting product matrix will have the same number of rows as matrix A and the same number of columns as B. Source Code:

  1. include<iostream>

using namespace std; int main() {

            int a[2][2];
            cout<<"Enter Number\n";
           for(int row=0;row<2;row++)
           {
                       for(int col=0;col<2;col++)
                       {
                                   cin>>a[row][col];
                       }
           cout<<endl;
           }
           cout<<"determinant:";
                       cout<<a[0][0]*a[1][1]-a[0][1]*a[1][0]<<endl;
                       return 0;

} For More Information Visit install wordpress forum based on bbpress plugin