#include "matrix.h"
#include <stdio.h>
#include <time.h>

double get_seconds() { /* routine to read time */
        clock_t t;
    t = clock();
        return (double) t/ (double) CLOCKS_PER_SEC;
}

main()
{
float **a,**b,**c;
int n;
int i,j;
double t0,t1;

printf("Enter n:  ");  scanf("%d",&n);  printf("n = %d\n",n);
a = matrix(1,n,1,n);
for (i=1;i<=n;i++) 
    for (j=1;j<=n;j++) 
        a[i][j] = i+j;

b = matrix(1,n,1,n);
for (i=1;i<=n;i++) 
    for (j=1;j<=n;j++) 
        b[i][j] = i-j;


t0 = get_seconds();
c = matrix_prod(n,n,n,n,a,b);
t1 = get_seconds();
printf("Time for matrix_prod = %f sec\n",t1-t0);

}
