Ok! heres the deal, i need help with a two part program. it goes like this: the
ID: 3622658 • Letter: O
Question
Ok! heres the deal, i need help with a two part program. it goes like this:the determinant of the 2 by 2 matrix
|a11 a12|
|a21 a22|
is defined as the scaler value a11a12-a21a12.similarly, the determinant of a 3 by 3 matrix defined as
|a11 a12 a13|
|a21 a22 a23|
|a31 a32 a33|
is determined as
a11 |a21 a23| -a21 |a12 a13|+a31|a12 a13|
|a32 a33| |a32 a33| |a22 a23|
A. using this information write and test two functions named det2() and det3().
The det2() function should accept the four coefficients of of a 2 by 2 matrix and return its determinant. The def3() function should accept the nine coefficients of a 3 BY 3 MATRIX AND RETURN ITS determinant by calling det2() to calculate the required 2 by 2 determinants
B. write and run a c++ program that accepts the nine coefficients of a 3 by 3 matrix in one function, passes these coefficients to det3(), and uses a thgird function to display the calculated determinant.
Explanation / Answer
Dear, #include #include using namespace std; const int Num_Of_Rows1=2; const int Num_Of_Cols1=2; const int Num_Of_Rows2=3; const int Num_Of_Cols2=3; void det2(int matrix[][Num_Of_Cols1],int Num_Of_Rows1); void det3(int matrix[][Num_Of_Cols2],int Num_Of_Rows2); int main() { int board1[Num_Of_Rows1][Num_Of_Cols1]; int board2[Num_Of_Rows2][Num_Of_Cols2]; char mat[5]; coutRelated Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.