what is the problem? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

what is the problem?

In this code I want to calculate determinant of a square Matrix But it doesn't work for 3*3 matrix. How can I correct it ? https://code.sololearn.com/cA6a23a22a19

16th Jan 2021, 3:04 PM
Shakiba Anaraki Firooz
Shakiba Anaraki Firooz - avatar
3 Answers
0
your code works, I just moved some instructions in it. https://code.sololearn.com/c76ImySmqKbJ/?ref=app
16th Jan 2021, 10:31 PM
John Robotane
John Robotane - avatar
0
shakiba which algorithm do you use to calculate the determinant?
16th Jan 2021, 5:58 PM
John Robotane
John Robotane - avatar
0
Laplace expansion you can see steps here https://www.mathsisfun.com/algebra/matrix-determinant.html
16th Jan 2021, 7:52 PM
Shakiba Anaraki Firooz
Shakiba Anaraki Firooz - avatar