Created
November 11, 2019 14:12
-
-
Save parzibyte/c70c95e2136d4acb4331065b91330e73 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Necesitamos hacer esto por cada columna de la segunda matriz (B) | |
for (int a = 0; a < COLUMNAS_MATRIZ_B; a++) { | |
// Dentro recorremos las filas de la primera (A) | |
for (int i = 0; i < FILAS_MATRIZ_A; i++) { | |
int suma = 0; | |
// Y cada columna de la primera (A) | |
for (int j = 0; j < COLUMNAS_MATRIZ_A; j++) { | |
// Multiplicamos y sumamos resultado | |
suma += matrizA[i][j] * matrizB[j][a]; | |
} | |
// Lo acomodamos dentro del producto | |
producto[i][a] = suma; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment