//Patriche Robert Cosmin
#include <iostream>
using namespace std;

void prodottoMatriciale(int A[3][2], int B[2][3], int C[3][3], int righeA, int colonneA, int righeB, int colonneB) {
    for (int i = 0; i < righeA; i++) {
        for (int j = 0; j < colonneB; j++) {
            C[i][j] = 0;
            for (int k = 0; k < colonneA; k++) {
                C[i][j] += A[i][k] * B[k][j];
            }
        }
    }
}

int main() {
    int A[3][2] = {{1, 2}, {3, 4}, {5, 6}};
    int B[2][3] = {{7, 8, 9}, {10, 11, 12}};
    int C[3][3];

    prodottoMatriciale(A, B, C, 3, 2, 2, 3);

    cout << "Prodotto matriciale (A * B):" << endl;
    for (int i = 0; i < 3; i++) {
        for (int j = 0; j < 3; j++) {
            cout << C[i][j] << " ";
        }
        cout << endl;
    }
    return 0;
}
