
detmatrix main.c
By: a guest on
Feb 25th, 2012 | syntax:
C | size: 0.70 KB | hits: 19 | expires: Never
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
// Include the functions to manipulate matrices
#include "functions.h"
// Height & With of the first matrice
#define H1 3
#define W1 3
int main(void) {
// To generate random numbers
srand (time (NULL));
// Creation and filling of the first matrice
int **mat1 = init_matrice(H1, W1);
mat1 = fill_matrice(mat1, H1, W1);
// Display the first matrice
display_matrice(mat1, H1, W1);
printf("\n");
// création de la seconde matrice
int **mat2 = init_matrice2(2, 2);
mat2 = new_matrice(mat1, W1, 1);
// affiche la nouvelle matrice
display_matrice(mat2, 2, 2);
printf("\n");
return 0;
}