Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #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;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement