#include <stdio.h>
#include "matrix.h"
#include "matrix_operations.h"
#include "matrix_alloc.h"


int
main()
{
	Matrix A = matrix_alloc(3, 3);
	Matrix B = matrix_alloc(3, 3);
	
	for(int i = 0, k = 1; i < 3; i++){
		for(int j = 0; j < 3; j++, k++){
			A.data[i][j] = k;
			B.data[i][j] = k;
		}
	}
	
	printf("Matrix 1\n");
	matrix_print(A);
	printf("Matrix 2\n");
	matrix_print(B);

	Matrix C = matrix_mult(A, B);
	printf("Multiplicatoin result:\n");
	matrix_print(C);

	Matrix D = matrix_add(B, C);
	printf("Addition result:\n");
	matrix_print(D);


	matrix_free(A);
	matrix_free(B);
	matrix_free(C);
	matrix_free(D);
	return 0;
}
