Open study

is now brainly

With Brainly you can:

  • Get homework help from millions of students and moderators
  • Learn how to solve problems with step-by-step explanations
  • Share your knowledge and earn points by helping other students
  • Learn anywhere, anytime with the Brainly app!

A community for students.

Matrix Multiplication C++

Computer Science
I got my questions answered at in under 10 minutes. Go to now for free help!
At vero eos et accusamus et iusto odio dignissimos ducimus qui blanditiis praesentium voluptatum deleniti atque corrupti quos dolores et quas molestias excepturi sint occaecati cupiditate non provident, similique sunt in culpa qui officia deserunt mollitia animi, id est laborum et dolorum fuga. Et harum quidem rerum facilis est et expedita distinctio. Nam libero tempore, cum soluta nobis est eligendi optio cumque nihil impedit quo minus id quod maxime placeat facere possimus, omnis voluptas assumenda est, omnis dolor repellendus. Itaque earum rerum hic tenetur a sapiente delectus, ut aut reiciendis voluptatibus maiores alias consequatur aut perferendis doloribus asperiores repellat.

Join Brainly to access

this expert answer


To see the expert answer you'll need to create a free account at Brainly

There seems to be some logical error here, and i am not able to really understand the following part. Code: And the part followed by //mult there.
the page you linked shows up empty for me; on Firefox
Ditto to the above comment.

Not the answer you are looking for?

Search for more explanations.

Ask your own question

Other answers:

My bad, fixed it, lets have a look at before the entire "mult" block... there now it's better. Instead of the cin >> m >> n; I used cin >> m; and the n = m; same for the o and p. Let's uncomment that mult block. everything seems fine now.
Yes but that would just multiply sqare matrices. I want it for normal multiplication, and want to know exactly what happens (inside) with those three loops.
But thanks for alteast caring about it @agdgdgdgwngo btw, in void print_matrix(int m[10][10], int s) what is int s for?
Ahh I thought you only needed square matrices :-P the s in the print_matrix procedure specifies the size of the square matrix. I've now modified the print_matrix procedure so it works on row and column dimensions. the first and second loops in main() just fill up the first and second matrices with input from cin the last loop does the dot product of two matrices
Wow! Its on a roll now! Sorry to trouble you so much, one last thing, what is the role of m and o in print_matrix(mult, m, o); if its for size as before, then shouldnt it be m,p? And for "for(int k=0;k
Right; it should be print_matrix(mult, m, p); my bad :-P Right about the for loop as well: that particular one one is computing the matrix product.
Thank you very much!

Not the answer you are looking for?

Search for more explanations.

Ask your own question