0

To add two matrices

write a program in c++

31st Mar 2017, 9:12 AM
vishal kalbande
vishal kalbande - avatar
1 Odpowiedź
+ 16
int matrix1[3][3]; int matrix2[3][3]; int result_matrix[3][3]; // codes to input to both matrix for (int i = 0; i < 3; i++) { for (int j = 0; j < 3; j++) { result_matrix[i][j] = matrix1[i][j] + matrix1[i][j]; } } // codes to output result_matrix
31st Mar 2017, 9:35 AM
Hatsy Rei
Hatsy Rei - avatar