Загрузка данных


#include <iostream>

import MatMod;

using namespace std;

int main()
{
    int A[SZ][SZ];
    int B[SZ][SZ];
    int C[SZ][SZ];

    cout << "Введите матрицу A:" << endl;

    for (int i = 0; i < SZ; i++)
        for (int j = 0; j < SZ; j++)
            cin >> A[i][j];

    cout << "Введите матрицу B:" << endl;

    for (int i = 0; i < SZ; i++)
        for (int j = 0; j < SZ; j++)
            cin >> B[i][j];

    mat_add(A, B, C);

    cout << endl << "A + B:" << endl;

    for (int i = 0; i < SZ; i++)
    {
        for (int j = 0; j < SZ; j++)
            cout << C[i][j] << " ";

        cout << endl;
    }

    mat_mul(A, B, C);

    cout << endl << "A * B:" << endl;

    for (int i = 0; i < SZ; i++)
    {
        for (int j = 0; j < SZ; j++)
            cout << C[i][j] << " ";

        cout << endl;
    }

    cout << endl << "det(A) = " << mat_det(A) << endl;

    return 0;
}