+ 1

please can someone help me with the logic of matrix multiplication of array 2*2

13th Nov 2017, 4:49 AM
Axim Raj
6 Antworten
+ 4
Do you have a code in development? link the code here so people can help you with the logic issue :)
13th Nov 2017, 5:19 AM
Ipang
0
/* Mul of array */ #include<iostream> using namespace std; int main() { int m, n, c, d, first[][], second[][], mul[][]; cout << "Enter the number of rows and columns of matrix : "; cin >> m >> n; cout << "Enter the elements of first matrix : \n"; for ( c = 0 ; c < m ; c++ ) for ( d = 0 ; d < n ; d++ ) cin >> first[c][d]; cout << "Enter the elements of second matrix : \n"; for ( c = 0 ; c < m ;c++ ) for ( d = 0 ; d < n ; d++ ) cin >> second[c][d]; for ( c = 0 ; c < m ; c++ ) for ( d = 0 ; d < n ; d++ ) mul[c][d] = first[c][d] * second[c][d]; cout << "Mul of entered matrices:-\n"; for ( c = 0 ; c < m ; c++ ) { for ( d = 0 ; d < n ; d++ ) cout << mul[c][d] << "\t"; cout << endl; } return 0; }
13th Nov 2017, 9:30 AM
Bhavin Kundaliya
Bhavin Kundaliya - avatar
0
I’m pretty sure this is c++ you might want to tag it as that, so that you can find some c++ programmers to help👌
13th Nov 2017, 10:58 AM
Daniel Smith
Daniel Smith - avatar
0
Thanks everyone
13th Nov 2017, 2:02 PM
Axim Raj
0
But the code above i think its just multiplication of the values of arrays with corresponding address
13th Nov 2017, 2:04 PM
Axim Raj
0
I need the logic of the multiplication we do in matrix
13th Nov 2017, 2:06 PM
Axim Raj