#include <stdio.h>
void multiplicarMatrices(int matriz1[][3], int matriz2[][4], int matriz3[][4], int filas1, int columnas1, int columnas2) {
for (int i = 0; i < filas1; i++) {
for (int j = 0; j < columnas2; j++) {
matriz3[i][j] = 0;
for (int k = 0; k < columnas1; k++) {
matriz3[i][j] += matriz1[i][k] * matriz2[k][j];
}
}
}
}
void imprimirMatriz(int matriz[][4], int filas, int columnas) {
for (int i = 0; i < filas; i++) {
for (int j = 0; j < columnas; j++) {
printf("%d ", matriz[i][j]);
}
printf("\n");
}
}
int main() {
int matriz1[2][3] = {{2, 3, 2}, {3, 4, 4}};
int matriz2[3][4] = {{1, 2, 3, 4}, {5, 6, 7, 8}, {9, 10, 11, 12}};
int matriz3[2][4];
int filas1 = sizeof(matriz1) / sizeof(matriz1[0]);
int columnas1 = sizeof(matriz1[0]) / sizeof(matriz1[0][0]);
int columnas2 = sizeof(matriz2[0]) / sizeof(matriz2[0][0]);
multiplicarMatrices(matriz1, matriz2, matriz3, filas1, columnas1, columnas2);
printf("Resultado de la multiplicación:\n");
imprimirMatriz(matriz3, filas1, columnas2);
return 0;
}