#include <iostream>

void Multiply(float N[4][4], float M[4][4], float Result[4][4])
{
    for (int I = 0; I < 4; ++I)
    {
        for (int J = 0; J < 4; ++J)
        {
            double SumElements = 0.0;
            for (int K = 0; K < 4; ++K)
            {
                SumElements += M[I][K] * N[K][J];
            }
            Result[I][J] = SumElements;
        }
    }
}

void Print(float mat[4][4])
{
	for (int i = 0; i < 4; ++i)
	{
		for (int j = 0; j < 4; ++j)
		{
			std::cout<<mat[i][j]<<" ";
		}
		std::cout<<"\n";
	}
}

int main()
{
	float N[4][4] = 
	{
		{1, 2, 3, 4},
		{5, 6, 7, 8},
		{9, 10, 11, 12},
		{13, 14, 15, 16}
	};
	
	float M[4][4] = 
	{
		{1, 2, 3, 4},
		{5, 6, 7, 8},
		{9, 10, 11, 12},
		{13, 14, 15, 16}
	};
	
	float Result[4][4];
	
	Multiply(N, M, Result);
	Print(Result);
}
