How can i add two matrics using array in c++ | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

How can i add two matrics using array in c++

24th Dec 2018, 10:18 PM
Shawil Auol
Shawil Auol - avatar
3 Answers
+ 1
Thanks
26th Dec 2018, 2:58 PM
Shawil Auol
Shawil Auol - avatar
0
2D array right??
25th Dec 2018, 2:14 PM
[ ]
[     ] - avatar
0
for 2D array let r and c be the rows and coloumn of the two matrix i.e 'a 'and 'b '....then the resulting array be 'c' be of the order r ×c the logic part: for(i=0;i<r;i++) {for(j=0;j<c;j++) { c[i][j]=a[i][j]+b[i][j]; } }
25th Dec 2018, 2:21 PM
[ ]
[     ] - avatar